Go to main content

Managing User Accounts and User Environments in Oracle® Solaris 11.4

Exit Print View

Updated: August 2021
 
 

How to Create the Home Directory for a User Without Creating a ZFS Dataset

  1. Become an administrator.

    See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  2. Add a new user account and specify the base directory for the same.
    # useradd -z no -m username
    80 blocks
  3. Assign a password to the new user account.
    # passwd username
    New Password:
    Re-enter new Password:
    passwd: password successfully changed for username

    Note - Make sure you have the User Security rights profile assigned in order to assign passwords.
  4. The home directory of the user account is created in the /export/home directory.
    # cat /etc/passwd
    root:x:0:0:Super-User:/root:/usr/bin/bash
    daemon:x:1:1::/:/bin/sh
    bin:x:2:2::/:/bin/sh
    sys:x:3:3::/:/bin/sh
    adm:x:4:4:Admin:/var/adm:/bin/sh
    dladm:x:15:65:Datalink Admin:/:
    netadm:x:16:65:Network Admin:/:
    netcfg:x:17:65:Network Configuration Admin:/:
    sshd:x:22:22:sshd privsep:/var/empty:/bin/false
    smmsp:x:25:25:SendMail Message Submission Program:/:
    username:x:167:10::/export/home/username:/usr/bin/bash
Example 3  Creating a User Account With a Home Directory That Is a Directory

Use the following command to create a user account with a home directory that is a directory rather than a ZFS file system:

# useradd -D -z no
Example 4  Creating a User Account With a Home Directory That Is a ZFS File System With Delegations

Use the following command to create a user account with a home directory that is a ZFS file system with the mount, create, and snapshot delegations:

# useradd -D -z yes
Example 5  Creating a User Account With a Home Directory That Is a ZFS File System Without Delegations

Use the following command to create a user account with a home directory that is a ZFS file system without delegations:

# useradd -D -z nodelegation