# useradd -d dir -m [-S ldap] username -z no|yes|nodelegation
Specifies the location of the home directory of the user. An optional server name can be added to the directory path, such as system1:/home/export/jdoe. The host information is written to auto_home and used by the automounter to mount the home directory.
Creates a local home directory on the system for the user if the directory does not yet exist. However, if the –d option specifies a host that is remote, then the home directory is not created.
If the directory does not yet exist, the home directory is created under the parent directory which is assumed as the the mount point of a ZFS dataset, such as export/home. The newly created directory is created as a multilevel dataset.
This option indicates that you are using LDAP and its repository for the account information. If you use LDAP, you can also assign default attributes by to the default@ user name which are applied to all users. For example:
$ useradd -S -K user-attributes default@
Multiple values can be specified for user-attributes and use the format key=value. These attributes are detailed in the user_attr(5) man page.
For more information, see How to Assign Default User Attributes for LDAP Accounts.
Specifies the default behavior of the useradd command when using the –z option.
Specifies that a new user account has a home directory that is a directory rather than a ZFS file system
Specifies that a new user account has a home directory that is a ZFS file system with delegations specified by the zfs allow snapshot,mount,create command
Specifies that a new user account has a home directory that is a ZFS file system with no delegations
After creating a user, you might need to perform some additional tasks, including adding and assigning roles to a user, and displaying or changing the rights profiles of a user. For more information, see Creating a Role in Securing Users and Processes in Oracle Solaris 11.4.