Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (9905 KB)
usermod(1M)Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Notes Name
Synopsis
usermod [-u uid [-o]] [-g group] [-G group [, group...]]
[-d dir [-m]] [-s shell] [-c comment] [-l new_name]
[-f inactive] [-e expire]
[-A authorization [, authorization]]
[-P profile [, profile]] [-R role [, role]]
[-K key=value] login
DescriptionThe usermod utility modifies a user's login definition on the system. It changes the definition of the specified login and makes the appropriate login-related system file and file system changes. The system file entries created with this command have a limit of 512 characters per line. Specifying long arguments to several options might exceed this limit. Options
The following options are supported: OperandsExamplesExample 1 Assigning Privileges to a UserThe following command adds the privilege that affects high resolution times to a user's initial, inheritable set of privileges.
This command results in the following entry in user_attr: jdoe::::type=normal;defaultpriv=basic,proc_clock_highres Example 2 Removing a Privilege from a User's Limit SetThe following command removes the privilege that allows the specified user to create hard links to directories and to unlink directories.
This command results in the following entry in user_attr: jdoe::::type=normal;defaultpriv=basic,limitpriv=all,!sys_linkdir Example 3 Removing a Privilege from a User's Basic SetThe following command removes the privilege that allows the specified user to examine processes outside the user's session.
This command results in the following entry in user_attr: jdoe::::type=normal;defaultpriv=basic,!proc_session;limitpriv=all Example 4 Assigning a Role to a UserThe following command assigns a role to a user. The role must have been created prior to this command, either through use of the Solaris Management Console GUI or through roleadd(1M).
This command results in the following entry in user_attr: jdoe::::type=normal;roles=mailadm;defaultpriv=basic;limitpriv=all Example 5 Removing All Profiles from a UserThe following command removes all profiles that were granted to a user directly. The user will still have any rights profiles that are granted by means of the PROFS_GRANTED key in policy.conf(4).
Exit Status
In case of an error, usermod prints an error message and exits with one of the following values: Files
AttributesSee attributes(5) for descriptions of the following attributes:
See Alsochown(1), passwd(1), users(1B), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), pwconv(1M), roleadd(1M), roledel(1M), rolemod(1M), useradd(1M), userdel(1M), getdate(3C), auth_attr(4), passwd(4), policy.conf(4), prof_attr(4), user_attr(4), attributes(5) NotesThe usermod utility modifies passwd definitions only in the local /etc/passwd and /etc/shadow files. If a network nameservice such as NIS or NIS+ is being used to supplement the local files with additional entries, usermod cannot change information supplied by the network nameservice. However usermod will verify the uniqueness of user name and user ID against the external nameservice. The usermod utility uses the /etc/datemsk file, available with SUNWaccr, for date formatting. Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Files | Attributes | See Also | Notes |
|||||||||||