Name

sharesec — 共有のACLに対する設定と取得

Synopsis

sharesec {sharename} [-r, --remove=ACL] [-m, --modify=ACL] [-a, --add=ACL] [-R, --replace=ACLs] [-D, --delete] [-v, --view] [-M, --machine-sid] [-F, --force] [-d, --debuglevel=DEBUGLEVEL] [-s, --configfile=CONFIGFILE] [-l, --log-basename=LOGFILEBASE] [-V, --version] [-?, --help] [--usage]

説明

このツールはsamba(7)システムの一部である。

sharesecプログラムは、SMBファイル共有上の共有のパーミッションを 操作するプログラムである。

オプション

以下のオプションはsharesecプログラムで有効である。ACLのフォーマットは、 ACL FORMATセクションで説明されている。

-a|--add=ACL

指定されたACLリストにACEを追加する。

-D|--delete

すべてのセキュリティディスクリプタを削除する。

-F|--force

強制的にACLを格納する。

-m|--modify=ACL

存在するACEを変更する。

-M|--machine-sid

マシンのSIDを初期化する。

-r|--remove=ACL

ACEを削除する。

-R|--replace=ACLS

存在する共有パーミッションACLを上書きする。

-h|--help

Print a summary of command line options.

-d|--debuglevel=level

level is an integer from 0 to 10. The default value if this parameter is not specified is 0.

The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

Note that specifying this parameter here will override the parameter in the smb.conf file.

-V|--version

Prints the program version number.

-s|--configfile <configuration file>

The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See smb.conf for more information. The default configuration file name is determined at compile time.

-l|--log-basename=logdirectory

Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.

ACL FORMAT

ACLのフォーマットは、1つまたはそれ以上の、カンマ又は改行で分離された、ACL エントリである。1つのACLエントリは以下のうちのどれかである:

	REVISION:<revision number>
	OWNER:<sid or name>
	GROUP:<sid or name>
	ACL:<sid or name>:<type>/<flags>/<mask>
	

ACLのリビジョンはセキュリティディスクリプタの 内部Windows NT ACL リビジョン を指定する。もしも指定されなければ既定値として1が取られる。1以外の値を使うこと は、奇妙な振る舞いを引き起こすかもしれない。

owner と group は、それぞれオブジェクトのためのownerとgroup SIDを指定する。 もしもSIDがS-1-x-y-z形式で指定されれば、それが使われ、それ以外では、 名前で指定されたと見なされ、対象のファイル又はディレクトリが存在するサーバ 上でSIDに解決される。

ACLは、そのSIDに対するパーミッションを指定する。このSIDはS-1-x-y-z 形式で指定されるが、そのファイル又はディレクトリが存在するサーバ上で 名前解決が出来る場合には、名前で指定できる。type,flagsとmask値は、そのSIDに 対して許可されるアクセス権の種類を決める。

typeはALLOWEDまたはDENIEDを、SIDに対するアクセスの許可/拒否として使う ことができる。flagの値は共有のACLに対しては通常ゼロである。

maskはSIDに対して許可されるアクセス権を表現する値である。これは、10進又は 16進の値として与えられるか、同じ名前の、Windows NTにおけるアクセス許可の 指定時に使用される、以下のテキスト文字列のどれか1つを使うことも出来る。

  • R - 読み取りを許可

  • W - 書き込みを許可

  • X - オブジェクトの実行を許可

  • D - オブジェクトの削除

  • P - パーミッションの変更

  • O - 所有権の取得

以下の組み合わせパーミッションも指定することができる:

  • READ - 'RX' と同等 permissions

  • CHANGE - 'RXWD' パーミッションと同等

  • FULL - 'RWXDPO' パーミッションと同等