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

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1m/usermod.1m
          +++ new/usr/src/man/man1m/usermod.1m
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    4  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    5  .\" 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]
   6    6  .TH USERMOD 1M "Feb 22, 2008"
   7    7  .SH NAME
   8    8  usermod \- modify a user's login information on the system
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12   12  \fBusermod\fR [\fB-u\fR \fIuid\fR [\fB-o\fR]] [\fB-g\fR \fIgroup\fR] [\fB-G\fR \fIgroup\fR [, \fIgroup\fR...]]
  13      -     [\fB-d\fR \fIdir\fR [\fB-m\fR]] [\fB-s\fR \fIshell\fR] [\fB-c\fR \fIcomment\fR] [\fB-l\fR \fInew_name\fR]
       13 +     [\fB-d\fR \fIdir\fR [\fB-m\fR [\fB-z|-Z\fR]]] [\fB-s\fR \fIshell\fR] [\fB-c\fR \fIcomment\fR] [\fB-l\fR \fInew_name\fR]
  14   14       [\fB-f\fR \fIinactive\fR] [\fB-e\fR \fIexpire\fR]
  15   15       [\fB-A\fR \fIauthorization\fR [, \fIauthorization\fR]]
  16   16       [\fB-P\fR \fIprofile\fR [, \fIprofile\fR]] [\fB-R\fR \fIrole\fR [, \fIrole\fR]]
  17   17       [\fB-K\fR \fIkey=value\fR] \fIlogin\fR
  18   18  .fi
  19   19  
  20   20  .SH DESCRIPTION
  21      -.sp
  22   21  .LP
  23   22  The \fBusermod\fR utility modifies a user's login definition on the system. It
  24   23  changes the definition of the specified login and makes the appropriate
  25   24  login-related system file and file system changes.
  26   25  .sp
  27   26  .LP
  28   27  The system file entries created with this command have a limit of 512
  29   28  characters per line. Specifying long arguments to several options might exceed
  30   29  this limit.
  31   30  .SH OPTIONS
  32      -.sp
  33   31  .LP
  34   32  The following options are supported:
  35   33  .sp
  36   34  .ne 2
  37   35  .na
  38   36  \fB\fB-A\fR \fIauthorization\fR\fR
  39   37  .ad
  40   38  .sp .6
  41   39  .RS 4n
  42   40  One or more comma separated authorizations as defined in \fBauth_attr\fR(4).
↓ open down ↓ 113 lines elided ↑ open up ↑
 156  154  .ad
 157  155  .sp .6
 158  156  .RS 4n
 159  157  Specify the new login name for the user. See \fBpasswd\fR(4) for the
 160  158  requirements for usernames.
 161  159  .RE
 162  160  
 163  161  .sp
 164  162  .ne 2
 165  163  .na
 166      -\fB\fB-m\fR\fR
      164 +\fB\fB-m\fR\fR [\fB-z|-Z\fR]
 167  165  .ad
 168  166  .sp .6
 169  167  .RS 4n
 170  168  Move the user's home directory to the new directory specified with the \fB-d\fR
 171  169  option. If the directory already exists, it must have permissions
 172  170  read/write/execute by \fIgroup\fR, where \fIgroup\fR is the user's primary
 173  171  group.
      172 +CHANGE_ZFS_FS option in /etc/default/useradd file determines if ZFS filesystem
      173 +will be created or destroyed during this action. If this option is set to yes
      174 +and parent directory of user's home directory is ZFS filesystem mount point, a
      175 +new ZFS filesystem is created. If old user's home directory is a ZFS file system
      176 +and CHANGE_ZFS_FS is set to yes, the filesystem will be destroyed.
      177 +\fB-z\fB and \fB-Z\fR options allow overwrite default behavior. If \fB-z\fR
      178 +option is specified, \fBusermod\fR tries to create new file system and destroy the
      179 +old one. If \fB-Z\fR option is specified, new filesystem is not created and the old
      180 +one is not destroyed.
 174  181  .RE
 175  182  
 176  183  .sp
 177  184  .ne 2
 178  185  .na
 179  186  \fB\fB-o\fR\fR
 180  187  .ad
 181  188  .sp .6
 182  189  .RS 4n
 183  190  This option allows the specified \fBUID\fR to be duplicated (non-unique).
↓ open down ↓ 42 lines elided ↑ open up ↑
 226  233  .sp .6
 227  234  .RS 4n
 228  235  Specify a new \fBUID\fR for the user. It must be a non-negative decimal integer
 229  236  less than \fBMAXUID\fR as defined in \fB<param.h>\fR\&. The \fBUID\fR
 230  237  associated with the user's home directory is not modified with this option; a
 231  238  user will not have access to their home directory until the \fBUID\fR is
 232  239  manually reassigned using \fBchown\fR(1).
 233  240  .RE
 234  241  
 235  242  .SH OPERANDS
 236      -.sp
 237  243  .LP
 238  244  The following operands are supported:
 239  245  .sp
 240  246  .ne 2
 241  247  .na
 242  248  \fB\fBlogin\fR\fR
 243  249  .ad
 244  250  .sp .6
 245  251  .RS 4n
 246  252  An existing login name to be modified.
↓ open down ↓ 115 lines elided ↑ open up ↑
 362  368  
 363  369  .sp
 364  370  .in +2
 365  371  .nf
 366  372  # \fBusermod -P "" jdoe\fR
 367  373  .fi
 368  374  .in -2
 369  375  .sp
 370  376  
 371  377  .SH EXIT STATUS
 372      -.sp
 373  378  .LP
 374  379  In case of an error, \fBusermod\fR prints an error message and exits with one
 375  380  of the following values:
 376  381  .sp
 377  382  .ne 2
 378  383  .na
 379  384  \fB\fB2\fR\fR
 380  385  .ad
 381  386  .sp .6
 382  387  .RS 4n
↓ open down ↓ 89 lines elided ↑ open up ↑
 472  477  .ne 2
 473  478  .na
 474  479  \fB\fB12\fR\fR
 475  480  .ad
 476  481  .sp .6
 477  482  .RS 4n
 478  483  Unable to complete the move of the home directory to the new home directory.
 479  484  .RE
 480  485  
 481  486  .SH FILES
      487 +.ne 2
      488 +.na
      489 +\fB\fB/etc/default/useradd\fR\fR
      490 +.ad
      491 +.sp .6
      492 +.RS 4n
      493 +useradd, usermod and userdel configuration file
      494 +.RE
      495 +
 482  496  .sp
 483  497  .ne 2
 484  498  .na
 485  499  \fB\fB/etc/group\fR\fR
 486  500  .ad
 487  501  .sp .6
 488  502  .RS 4n
 489  503  system file containing group definitions
 490  504  .RE
 491  505  
↓ open down ↓ 31 lines elided ↑ open up ↑
 523  537  .ne 2
 524  538  .na
 525  539  \fB\fB/etc/user_attr\fR\fR
 526  540  .ad
 527  541  .sp .6
 528  542  .RS 4n
 529  543  system file containing additional user and role attributes
 530  544  .RE
 531  545  
 532  546  .SH ATTRIBUTES
 533      -.sp
 534  547  .LP
 535  548  See \fBattributes\fR(5) for descriptions of the following attributes:
 536  549  .sp
 537  550  
 538  551  .sp
 539  552  .TS
 540  553  box;
 541  554  c | c
 542  555  l | l .
 543  556  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 544  557  _
 545  558  Interface Stability     Committed
 546  559  .TE
 547  560  
 548  561  .SH SEE ALSO
 549      -.sp
 550  562  .LP
 551  563  \fBchown\fR(1), \fBpasswd\fR(1), \fBusers\fR(1B), \fBgroupadd\fR(1M),
 552  564  \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBlogins\fR(1M), \fBpwconv\fR(1M),
 553  565  \fBroleadd\fR(1M), \fBroledel\fR(1M), \fBrolemod\fR(1M), \fBuseradd\fR(1M),
 554  566  \fBuserdel\fR(1M), \fBgetdate\fR(3C), \fBauth_attr\fR(4), \fBpasswd\fR(4),
 555  567  \fBpolicy.conf\fR(4), \fBprof_attr\fR(4), \fBuser_attr\fR(4),
 556  568  \fBattributes\fR(5)
 557  569  .SH NOTES
 558      -.sp
 559  570  .LP
 560  571  The \fBusermod\fR utility modifies \fBpasswd\fR definitions only in the local
 561  572  \fB/etc/passwd\fR and \fB/etc/shadow\fR files. If a network nameservice such as
 562  573  \fBNIS\fR or \fBNIS+\fR is being used to supplement the local files with
 563  574  additional entries, \fBusermod\fR cannot change information supplied by the
 564  575  network nameservice. However \fBusermod\fR will verify the uniqueness of user
 565  576  name and user \fBID\fR against the external nameservice.
 566  577  .sp
 567  578  .LP
 568  579  The \fBusermod\fR utility uses the \fB/etc/datemsk\fR file, available with
 569  580  SUNWaccr, for date formatting.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX