Print this page
293 useradd/del/mod should be ZFS-aware
   1 USERMOD(1M)                  Maintenance Commands                  USERMOD(1M)
   2 
   3 
   4 
   5 NAME
   6        usermod - modify a user's login information on the system
   7 
   8 SYNOPSIS
   9        usermod [-u uid [-o]] [-g group] [-G group [, group...]]
  10             [-d dir [-m]] [-s shell] [-c comment] [-l new_name]
  11             [-f inactive] [-e expire]
  12             [-A authorization [, authorization]]
  13             [-P profile [, profile]] [-R role [, role]]
  14             [-K key=value] login
  15 
  16 
  17 DESCRIPTION
  18        The usermod utility modifies a user's login definition on the system.
  19        It changes the definition of the specified login and makes the
  20        appropriate login-related system file and file system changes.
  21 
  22 
  23        The system file entries created with this command have a limit of 512
  24        characters per line. Specifying long arguments to several options might
  25        exceed this limit.
  26 
  27 OPTIONS
  28        The following options are supported:
  29 
  30        -A authorization


  85            specific implied key options (-A, -P, -R, -p). See user_attr(4) for
  86            a list of valid keys. Values for these keys are usually found in
  87            man pages or other sources related to those keys. For example, see
  88            project(4) for guidance on values for the project key. Use the
  89            command ppriv(1) with the -v and -l options for a list of values
  90            for the keys defaultpriv and limitpriv.
  91 
  92            The keyword type can be specified with the value role or the value
  93            normal.  When using the value role, the account changes from a
  94            normal user to a role; using the value normal keeps the account a
  95            normal user.
  96 
  97            As a role account, no roles (-R or roles=value) can be present.
  98 
  99 
 100        -l new_logname
 101            Specify the new login name for the user. See passwd(4) for the
 102            requirements for usernames.
 103 
 104 
 105        -m
 106            Move the user's home directory to the new directory specified with
 107            the -d option. If the directory already exists, it must have
 108            permissions read/write/execute by group, where group is the user's
 109            primary group.









 110 
 111 
 112        -o
 113            This option allows the specified UID to be duplicated (non-unique).
 114 
 115 
 116        -P profile
 117            One or more comma-separated rights profiles defined in
 118            prof_attr(4). This replaces any existing profile setting in
 119            user_attr(4). If an empty profile list is specified, the existing
 120            setting is removed.
 121 
 122 
 123        -R role
 124            One or more comma-separated roles (see roleadd(1M)). This replaces
 125            any existing role setting. If no role list is specified, the
 126            existing setting is removed.
 127 
 128 
 129        -s shell


 266        9
 267            The new_logname is already in use.
 268 
 269 
 270        10
 271            Cannot update the /etc/group or /etc/user_attr file. Other update
 272            requests will be implemented.
 273 
 274 
 275        11
 276            Insufficient space to move the home directory (-m option). Other
 277            update requests will be implemented.
 278 
 279 
 280        12
 281            Unable to complete the move of the home directory to the new home
 282            directory.
 283 
 284 
 285 FILES




 286        /etc/group
 287            system file containing group definitions
 288 
 289 
 290        /etc/datemsk
 291            system file of date formats
 292 
 293 
 294        /etc/passwd
 295            system password file
 296 
 297 
 298        /etc/shadow
 299            system file containing users' encrypted passwords and related
 300            information
 301 
 302 
 303        /etc/user_attr
 304            system file containing additional user and role attributes
 305 


   1 USERMOD(1M)                  Maintenance Commands                  USERMOD(1M)
   2 
   3 
   4 
   5 NAME
   6        usermod - modify a user's login information on the system
   7 
   8 SYNOPSIS
   9        usermod [-u uid [-o]] [-g group] [-G group [, group...]]
  10             [-d dir [-m [-z|-Z]]] [-s shell] [-c comment] [-l new_name]
  11             [-f inactive] [-e expire]
  12             [-A authorization [, authorization]]
  13             [-P profile [, profile]] [-R role [, role]]
  14             [-K key=value] login
  15 
  16 
  17 DESCRIPTION
  18        The usermod utility modifies a user's login definition on the system.
  19        It changes the definition of the specified login and makes the
  20        appropriate login-related system file and file system changes.
  21 
  22 
  23        The system file entries created with this command have a limit of 512
  24        characters per line. Specifying long arguments to several options might
  25        exceed this limit.
  26 
  27 OPTIONS
  28        The following options are supported:
  29 
  30        -A authorization


  85            specific implied key options (-A, -P, -R, -p). See user_attr(4) for
  86            a list of valid keys. Values for these keys are usually found in
  87            man pages or other sources related to those keys. For example, see
  88            project(4) for guidance on values for the project key. Use the
  89            command ppriv(1) with the -v and -l options for a list of values
  90            for the keys defaultpriv and limitpriv.
  91 
  92            The keyword type can be specified with the value role or the value
  93            normal.  When using the value role, the account changes from a
  94            normal user to a role; using the value normal keeps the account a
  95            normal user.
  96 
  97            As a role account, no roles (-R or roles=value) can be present.
  98 
  99 
 100        -l new_logname
 101            Specify the new login name for the user. See passwd(4) for the
 102            requirements for usernames.
 103 
 104 
 105        -m [-z|-Z]
 106            Move the user's home directory to the new directory specified with
 107            the -d option. If the directory already exists, it must have
 108            permissions read/write/execute by group, where group is the user's
 109            primary group.  CHANGE_ZFS_FS option in /etc/default/useradd file
 110            determines if ZFS filesystem will be created or destroyed during
 111            this action. If this option is set to yes and parent directory of
 112            user's home directory is ZFS filesystem mount point, a new ZFS
 113            filesystem is created. If old user's home directory is a ZFS file
 114            system and CHANGE_ZFS_FS is set to yes, the filesystem will be
 115            destroyed.  -z and -Z options allow overwrite default behavior. If
 116            -z option is specified, usermod tries to create new file system and
 117            destroy the old one. If -Z option is specified, new filesystem is
 118            not created and the old one is not destroyed.
 119 
 120 
 121        -o
 122            This option allows the specified UID to be duplicated (non-unique).
 123 
 124 
 125        -P profile
 126            One or more comma-separated rights profiles defined in
 127            prof_attr(4). This replaces any existing profile setting in
 128            user_attr(4). If an empty profile list is specified, the existing
 129            setting is removed.
 130 
 131 
 132        -R role
 133            One or more comma-separated roles (see roleadd(1M)). This replaces
 134            any existing role setting. If no role list is specified, the
 135            existing setting is removed.
 136 
 137 
 138        -s shell


 275        9
 276            The new_logname is already in use.
 277 
 278 
 279        10
 280            Cannot update the /etc/group or /etc/user_attr file. Other update
 281            requests will be implemented.
 282 
 283 
 284        11
 285            Insufficient space to move the home directory (-m option). Other
 286            update requests will be implemented.
 287 
 288 
 289        12
 290            Unable to complete the move of the home directory to the new home
 291            directory.
 292 
 293 
 294 FILES
 295        /etc/default/useradd
 296            useradd, usermod and userdel configuration file
 297 
 298 
 299        /etc/group
 300            system file containing group definitions
 301 
 302 
 303        /etc/datemsk
 304            system file of date formats
 305 
 306 
 307        /etc/passwd
 308            system password file
 309 
 310 
 311        /etc/shadow
 312            system file containing users' encrypted passwords and related
 313            information
 314 
 315 
 316        /etc/user_attr
 317            system file containing additional user and role attributes
 318