Print this page
293 useradd/del/mod should be ZFS-aware

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1m/useradd.1m
          +++ new/usr/src/man/man1m/useradd.1m
↓ open down ↓ 6 lines elided ↑ open up ↑
   7    7  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8    8  .TH USERADD 1M "Apr 16, 2013"
   9    9  .SH NAME
  10   10  useradd \- administer a new user login on the system
  11   11  .SH SYNOPSIS
  12   12  .LP
  13   13  .nf
  14   14  \fBuseradd\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  15   15       [\fB-b\fR \fIbase_dir\fR] [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIdir\fR] [\fB-e\fR \fIexpire\fR]
  16   16       [\fB-f\fR \fIinactive\fR] [\fB-g\fR \fIgroup\fR] [\fB-G\fR \fIgroup\fR [,\fIgroup\fR]...]
  17      -     [\fB-K\fR \fIkey=value\fR] [\fB-m\fR [\fB-k\fR \fIskel_dir\fR]] [\fB-p\fR \fIprojname\fR]
       17 +     [\fB-K\fR \fIkey=value\fR] [\fB-m\fR [\fB-z|-Z\fR] [\fB-k\fR \fIskel_dir\fR]] [\fB-p\fR \fIprojname\fR]
  18   18       [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  19   19       [\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] \fIlogin\fR
  20   20  .fi
  21   21  
  22   22  .LP
  23   23  .nf
  24   24  \fBuseradd\fR \fB-D\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  25   25       [\fB-b\fR \fIbase_dir\fR] [\fB-s\fR \fIshell\fR [\fB-k\fR \fIskel_dir\fR]] [\fB-e\fR \fIexpire\fR]
  26   26       [\fB-f\fR \fIinactive\fR] [\fB-g\fR \fIgroup\fR] [\fB-K\fR \fIkey=value\fR] [\fB-p\fR \fIprojname\fR]
  27   27       [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  28   28  .fi
  29   29  
  30   30  .SH DESCRIPTION
  31      -.sp
  32   31  .LP
  33   32  \fBuseradd\fR adds a new user to the \fB/etc/passwd\fR and \fB/etc/shadow\fR
  34   33  and \fB/etc/user_attr\fR files. The \fB-A\fR and \fB-P\fR options respectively
  35   34  assign authorizations and profiles to the user. The \fB-R\fR option assigns
  36   35  roles to a user. The \fB-p\fR option associates a project with a user. The
  37   36  \fB-K\fR option adds a \fIkey=value\fR pair to \fB/etc/user_attr\fR for the
  38   37  user. Multiple \fIkey=value\fR pairs may be added with multiple \fB-K\fR
  39   38  options.
  40   39  .sp
  41   40  .LP
↓ open down ↓ 17 lines elided ↑ open up ↑
  59   58  .LP
  60   59  \fBuseradd\fR requires that usernames be in the format described in
  61   60  \fBpasswd\fR(4). A warning message is displayed if these restrictions are not
  62   61  met. See \fBpasswd\fR(4) for the requirements for usernames.
  63   62  .LP
  64   63  To change the action of \fBuseradd\fR when the traditional login name
  65   64  length limit of eight characters is exceeded, edit the file
  66   65  \fB/etc/default/useradd\fR by removing the \fB#\fR (pound sign) before the
  67   66  appropriate \fBEXCEED_TRAD=\fR entry, and adding it before the others.
  68   67  .SH OPTIONS
  69      -.sp
  70   68  .LP
  71   69  The following options are supported:
  72   70  .sp
  73   71  .ne 2
  74   72  .na
  75   73  \fB\fB-A\fR \fIauthorization\fR\fR
  76   74  .ad
  77   75  .sp .6
  78   76  .RS 4n
  79   77  One or more comma separated authorizations defined in \fBauth_attr\fR(4). Only
↓ open down ↓ 254 lines elided ↑ open up ↑
 334  332  .RS 4n
 335  333  A directory that contains skeleton information (such as \fB\&.profile\fR) that
 336  334  can be copied into a new user's home directory. This directory must already
 337  335  exist. The system provides the \fB/etc/skel\fR directory that can be used for
 338  336  this purpose.
 339  337  .RE
 340  338  
 341  339  .sp
 342  340  .ne 2
 343  341  .na
 344      -\fB\fB-m\fR\fR
      342 +\fB\fB-m\fR\fR [\fB-z|-Z\fR]
 345  343  .ad
 346  344  .sp .6
 347  345  .RS 4n
 348  346  Create the new user's home directory if it does not already exist. If the
 349  347  directory already exists, it must have read, write, and execute permissions by
 350  348  \fIgroup\fR, where \fIgroup\fR is the user's primary group.
      349 +CHANGE_ZFS_FS option in /etc/default/useradd file determines if ZFS filesystem
      350 +will be created for new user. If this option is set to yes and parent directory
      351 +of user's home directory is ZFS filesystem mount point, a new ZFS filesystem is
      352 +created. \fB-z\fR and \fB-Z\fR options allow overwrite default behavior.
      353 +If \fB-z\fR option is specified, \fBuseradd\fR tries to create new file system
      354 +for user. If \fB-Z\fR option is specified, new file system is not created.
 351  355  .RE
 352  356  
 353  357  .sp
 354  358  .ne 2
 355  359  .na
 356  360  \fB\fB-o\fR\fR
 357  361  .ad
 358  362  .sp .6
 359  363  .RS 4n
 360  364  This option allows a \fBUID\fR to be duplicated (non-unique).
↓ open down ↓ 52 lines elided ↑ open up ↑
 413  417  .RS 4n
 414  418  The \fBUID\fR of the new user. This \fBUID\fR must be a non-negative decimal
 415  419  integer below \fBMAXUID\fR as defined in \fB<sys/param.h>\fR\&. The \fBUID\fR
 416  420  defaults to the next available (unique) number above the highest number
 417  421  currently assigned. For example, if \fBUID\fRs 100, 105, and 200 are assigned,
 418  422  the next default \fBUID\fR number will be 201. \fBUID\fRs \fB0\fR-\fB99\fR are
 419  423  reserved for allocation by the Solaris Operating System.
 420  424  .RE
 421  425  
 422  426  .SH FILES
 423      -.sp
 424  427  .LP
 425  428  \fB/etc/default/useradd\fR
 426  429  .sp
 427  430  .LP
 428  431  \fB/etc/datemsk\fR
 429  432  .sp
 430  433  .LP
 431  434  \fB/etc/passwd\fR
 432  435  .sp
 433  436  .LP
↓ open down ↓ 4 lines elided ↑ open up ↑
 438  441  .sp
 439  442  .LP
 440  443  \fB/etc/skel\fR
 441  444  .sp
 442  445  .LP
 443  446  \fB/usr/include/limits.h\fR
 444  447  .sp
 445  448  .LP
 446  449  \fB/etc/user_attr\fR
 447  450  .SH ATTRIBUTES
 448      -.sp
 449  451  .LP
 450  452  See \fBattributes\fR(5) for descriptions of the following attributes:
 451  453  .sp
 452  454  
 453  455  .sp
 454  456  .TS
 455  457  box;
 456  458  c | c
 457  459  l | l .
 458  460  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 459  461  _
 460  462  Interface Stability     Committed
 461  463  .TE
 462  464  
 463  465  .SH SEE ALSO
 464      -.sp
 465  466  .LP
 466  467  \fBpasswd\fR(1), \fBprofiles\fR(1), \fBroles\fR(1), \fBusers\fR(1B),
 467  468  \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBgrpck\fR(1M),
 468  469  \fBlogins\fR(1M), \fBpwck\fR(1M), \fBuserdel\fR(1M), \fBusermod\fR(1M),
 469  470  \fBgetdate\fR(3C), \fBauth_attr\fR(4), \fBpasswd\fR(4), \fBprof_attr\fR(4),
 470  471  \fBproject\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
 471  472  .SH DIAGNOSTICS
 472      -.sp
 473  473  .LP
 474  474  In case of an error, \fBuseradd\fR prints an error message and exits with a
 475  475  non-zero status.
 476  476  .sp
 477  477  .LP
 478  478  The following indicates that \fBlogin\fR specified is already in use:
 479  479  .sp
 480  480  .in +2
 481  481  .nf
 482  482  UX: useradd: ERROR: login is already in use. Choose another.
↓ open down ↓ 55 lines elided ↑ open up ↑
 538  538  do not exist:
 539  539  .sp
 540  540  .in +2
 541  541  .nf
 542  542  UX: useradd: ERROR: Cannot update system files - login cannot be created.
 543  543  .fi
 544  544  .in -2
 545  545  .sp
 546  546  
 547  547  .SH NOTES
 548      -.sp
 549  548  .LP
 550  549  The \fBuseradd\fR utility adds definitions to only the local \fB/etc/group\fR,
 551  550  \fBetc/passwd\fR, \fB/etc/passwd\fR, \fB/etc/shadow\fR, \fB/etc/project\fR, and
 552  551  \fB/etc/user_attr\fR files. If a network name service such as \fBNIS\fR or
 553  552  \fBNIS+\fR is being used to supplement the local \fB/etc/passwd\fR file with
 554  553  additional entries, \fBuseradd\fR cannot change information supplied by the
 555  554  network name service. However \fBuseradd\fR will verify the uniqueness of the
 556  555  user name (or role) and user id and the existence of any group names specified
 557  556  against the external name service.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX