Table of ContentsView in Frames

Creating a home directory configuration using the %w and %d variables

You can create a home directory configuration using the %w and %d variables. Users can then connect to their home share using dynamically created shares.

Steps

  1. Optional: Create a qtree to contain user's home directories by entering the following command:
    volume qtree create -vserver vserver_name -qtree-path qtree_path
  2. Optional: Verify that the qtree is using the correct security style by entering the following command:
    volume qtree show

  3. Optional: If the qtree is not using the desired security style, change the security style using the volume qtree security command.
  4. Add a home directory share by entering the following command:
    vserver cifs share create -vserver vserver -share-name %w -path %d/%w -share-properties homedirectory[,...]

    -vserver vserver specifies the CIFS-enabled Vserver on which to add the search path.

    -share-name %w specifies the home directory share name. Data ONTAP dynamically creates the share name as each user connects to their home directory. The share name will be of the form windows_user_name.

    -path %d/%w specifies the relative path to the home directory. The relative path is dynamically created as each user connects to their home directory and will be of the form domain/windows_user_name.

    -share-properties homedirectory[,...] specifies the share properties for that share. You must specify the homedirectory value. You can specify additional share properties using a comma delimited list.

  5. Verify that the share has the desired configuration using the vserver cifs share show command.
  6. Add a home directory search path by entering the following command:
    vserver cifs home-directory search-path add -vserver vserver -path path

    -vserver vserver specifies the CIFS-enabled Vserver on which to add the search path.

    -path path specifies the absolute directory path to the search path.

  7. Verify that you successfully added the search path using the vserver cifs home-directory search-path show command.
  8. For users with a home directory, create a corresponding directory in the qtree or volume designated to contain home directories.

    For example, if you created a qtree with the path of /vol/vol1/users and the user name whose directory you want to create is mydomain\user1, you would create a directory with the following path: /vol/vol1/users/mydomain/user1.

  9. Verify that a user can successfully connect to the home share either by mapping a drive or connecting using the UNC path.

    For example, if user mydomain\user1 wants to connect to the directory created in Step 8 that is located on Vserver vs1, user1 would connect using the UNC path \\vs1\user1.

Example

The following example creates a home directory configuration using %w as the share name and %d/%w for the relative home directory path that is appended to the configured absolute search path or paths. The CIFS home directory configuration is created on Vserver vs1. The qtree /vol/vol1/home1, used to contain the home directories, is configured as a NTFS-security style qtree. You can use this type of home directory configuration when users access their home directories from Windows hosts. You can also use this type of configuration when users access their home directories from Windows and UNIX hosts and the file system administrator uses Windows-based users and groups to control access to the file system.

cluster::> volume qtree create -vserver vs1 /vol/vol1/users

cluster::> volume qtree show
Vserver    Volume      Qtree    Style    Oplocks   Status
---------- ----------- -------- -------- --------- --------
vs1        root_vol    ""       ntfs     enable    normal
vs1        vol1        ""       ntfs     enable    normal
vs1        vol1        users    ntfs     enable    normal

cluster::> vserver cifs share create -vserver vs1 -share-name %w -path %d/%w -share-properties oplocks,browsable,changenotify,homedirectory


cluster::> vserver cifs share show -vserver vs1 -share-name %w
Vserver  Share  Path   Properties     Comment  ACL
-------- -----  -----  ------------   -------- -----------
vs1      %w     %d/%w  oplocks        -        Everyone / Full Control
                       browsable
                       changenotify
                       homedirectory

cluster::> vserver cifs home-directory search-path add -vserver vs1 ‑path /vol/vol1/users

cluster::> vserver cifs home-directory search-path show
Vserver     Position Path
----------- -------- -----------------
vs1         1        /vol/vol1/users