-
使用 create 命令添加自动主目录规则,使用 list 命令列出现有规则。此示例为用户 "Bill" 添加规则,然后列出规则:
twofish:> configuration services smb
twofish:configuration services smb> create
twofish:configuration services rule (uncommitted)> set use_nss=false
twofish:configuration services rule (uncommitted)> set user=Bill
twofish:configuration services rule (uncommitted)> set directory=/export/wdp
twofish:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
ou=Engineering,CN=myhome"
twofish:configuration services rule (uncommitted)> commit
twofish:configuration services smb> list
RULE NSS USER DIRECTORY CONTAINER
rule-000 false Bill /export/wdp dc=com,dc=fishworks,
ou=Engineering,CN=myhome
-
可以使用通配符创建自动主目录规则。& 字符匹配用户的用户名,? 字符匹配用户的用户名中第一个字符。下面的示例使用通配符来匹配所有用户:
twofish:configuration services smb> create
twofish:configuration services rule (uncommitted)> set use_nss=false
twofish:configuration services rule (uncommitted)> set user=*
twofish:configuration services rule (uncommitted)> set directory=/export/?/&
twofish:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
ou=Engineering,CN=myhome"
twofish:configuration services rule (uncommitted)> commit
twofish:configuration services smb> list
RULE NSS USER DIRECTORY CONTAINER
rule-000 false Bill /export/wdp dc=com,dc=fishworks,
ou=Engineering,CN=myhome
-
还可以使用名称服务转换来创建自动主目录规则:
twofish:configuration services smb> create
twofish:configuration services rule (uncommitted)> set use_nss=true
twofish:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
ou=Engineering,CN=myhome"
twofish:configuration services rule (uncommitted)> commit
twofish:configuration services smb> list
RULE NSS USER DIRECTORY CONTAINER
rule-000 true dc=com,dc=fishworks,
ou=Engineering,CN=myhome