Administering Resource Management in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

Setting User Attributes With the useradd and usermod Commands

You can use the following commands with the –K option and a key=value pair to set user attributes in local files:


Set default project for user


Modify user information

Local files can include the following:

  • /etc/group

  • /etc/passwd

  • /etc/project

  • /etc/shadow

  • /etc/user_attr

If a network naming service such as NIS is being used to supplement the local file with additional entries, these commands cannot change information supplied by the network name service. However, the commands do verify the following against the external naming service database:

  • Uniqueness of the user name (or role)

  • Uniqueness of the user ID

  • Existence of any group names specified

For more information, see the useradd(1M), usermod(1M), and user_attr(4) man pages.