Go to main content

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x

Exit Print View

Updated: November 2018
 
 

Adding SMB Autohome Rules (CLI)

  1. Go to configuration services smb.
  2. Use the create command to add autohome rules, and the list command to list existing rules.

    This example adds a rule for the user "Bill" then lists the rules:

    hostname:> configuration services smb
    hostname:configuration services smb> create
    hostname:configuration services rule (uncommitted)> set use_nss=false 
    hostname:configuration services rule (uncommitted)> set user=Bill
    hostname:configuration services rule (uncommitted)> set directory=/export/wdp
    hostname:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
       ou=Engineering,CN=myhome"
    hostname:configuration services rule (uncommitted)> commit
    hostname:configuration services smb> list
    RULE       NSS      USER         DIRECTORY            CONTAINER           
    rule-000   false    Bill         /export/wdp          dc=com,dc=fishworks,
       ou=Engineering,CN=myhome
  3. Create Autohome rules using wildcard characters.

    The & character matches the users' username, and the ? character matches the first letter of the users' username. The following uses wildcards to match all users:

    hostname:configuration services smb> create
    hostname:configuration services rule (uncommitted)> set use_nss=false 
    hostname:configuration services rule (uncommitted)> set user=*
    hostname:configuration services rule (uncommitted)> set directory=/export/?/&
    hostname:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
       ou=Engineering,CN=myhome"
    hostname:configuration services rule (uncommitted)> commit
    hostname:configuration services smb> list
    RULE       NSS      USER         DIRECTORY            CONTAINER           
    rule-000   false    Bill         /export/wdp          dc=com,dc=fishworks,
       ou=Engineering,CN=myhome
  4. The name service switch can also be used to create autohome rules:
    hostname:configuration services smb> create
    hostname:configuration services rule (uncommitted)> set use_nss=true 
    hostname:configuration services rule (uncommitted)> set container="dc=com,dc=fishworks,
       ou=Engineering,CN=myhome"
    hostname:configuration services rule (uncommitted)> commit
    hostname:configuration services smb> list
    RULE       NSS      USER         DIRECTORY            CONTAINER           
    rule-000   true                                       dc=com,dc=fishworks,
       ou=Engineering,CN=myhome