sharesec — 共有のACLに対する設定と取得
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]
以下のオプションはsharesec
プログラムで有効である。ACLのフォーマットは、
ACL FORMATセクションで説明されている。
指定されたACLリストにACEを追加する。
すべてのセキュリティディスクリプタを削除する。
強制的にACLを格納する。
存在するACEを変更する。
マシンのSIDを初期化する。
ACEを削除する。
存在する共有パーミッションACLを上書きする。
Print a summary of command line options.
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.
Prints the program version number.
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.
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のフォーマットは、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' パーミッションと同等
The sharesec
プログラムは、操作が実行された時の成功、またはそれ以外の状態に
応じて終了ステータスをセットする。終了ステータスは以下の値のうちのどれかである。
もしも操作が成功すれば、sharesecは終了ステータスを0にして戻る。もしも、
sharesec
が指定されたサーバに接続できないか、ACLの設定
又は取得時にエラーが生じたならば、終了ステータスは1で戻る。もしもコマンド行
引数の解釈時にエラーがあれば終了ステータスは2で戻る。
SIDに対してフルアクセスを追加
S-1-5-21-1866488690-1365729215-3963860297-17724
on
share
:
host:~ # sharesec share -a S-1-5-21-1866488690-1365729215-3963860297-17724:ALLOWED/0/FULL
share
に対するすべてのACEを表示:
host:~ # sharesec share -v REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/0x101f01ff ACL:S-1-5-21-1866488690-1365729215-3963860297-17724:ALLOWED/0/FULL