Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars
   1 '\" te

   2 .\" Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright 1989 AT&T
   4 .\" 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.
   5 .\" 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.
   6 .\" 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]
   7 .TH USERADD 1M "Feb 19, 2008"
   8 .SH NAME
   9 useradd \- administer a new user login on the system
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBuseradd\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  14      [\fB-b\fR \fIbase_dir\fR] [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIdir\fR] [\fB-e\fR \fIexpire\fR]
  15      [\fB-f\fR \fIinactive\fR] [\fB-g\fR \fIgroup\fR] [\fB-G\fR \fIgroup\fR [,\fIgroup\fR]...]
  16      [\fB-K\fR \fIkey=value\fR] [\fB-m\fR [\fB-k\fR \fIskel_dir\fR]] [\fB-p\fR \fIprojname\fR]
  17      [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  18      [\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] \fIlogin\fR
  19 .fi
  20 
  21 .LP
  22 .nf
  23 \fBuseradd\fR \fB-D\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  24      [\fB-b\fR \fIbase_dir\fR] [\fB-s\fR \fIshell\fR [\fB-k\fR \fIskel_dir\fR]] [\fB-e\fR \fIexpire\fR]
  25      [\fB-f\fR \fIinactive\fR] [\fB-g\fR \fIgroup\fR] [\fB-K\fR \fIkey=value\fR] [\fB-p\fR \fIprojname\fR]
  26      [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  27 .fi


  42 (\fB-G\fR option) and creates the home directory (\fB-m\fR option) for the user
  43 if requested. The new login remains locked until the \fBpasswd\fR(1) command is
  44 executed.
  45 .sp
  46 .LP
  47 Specifying \fBuseradd\fR \fB-D\fR with the \fB-s\fR, \fB-k\fR,\fB-g\fR,
  48 \fB-b\fR, \fB-f\fR, \fB-e\fR, \fB-A\fR, \fB-P\fR, \fB-p\fR, \fB-R\fR, or
  49 \fB-K\fR option (or any combination of these options) sets the default values
  50 for the respective fields. See the \fB-D\fR option, below. Subsequent
  51 \fBuseradd\fR commands without the \fB-D\fR option use these arguments.
  52 .sp
  53 .LP
  54 The system file entries created with this command have a limit of 2048
  55 characters per line. Specifying long arguments to several options can exceed
  56 this limit.
  57 .sp
  58 .LP
  59 \fBuseradd\fR requires that usernames be in the format described in
  60 \fBpasswd\fR(4). A warning message is displayed if these restrictions are not
  61 met. See \fBpasswd\fR(4) for the requirements for usernames.





  62 .SH OPTIONS
  63 .sp
  64 .LP
  65 The following options are supported:
  66 .sp
  67 .ne 2
  68 .na
  69 \fB\fB-A\fR \fIauthorization\fR\fR
  70 .ad
  71 .sp .6
  72 .RS 4n
  73 One or more comma separated authorizations defined in \fBauth_attr\fR(4). Only
  74 a user or role who has \fBgrant\fR rights to the authorization can assign it to
  75 an account.
  76 .RE
  77 
  78 .sp
  79 .ne 2
  80 .na
  81 \fB\fB-b\fR \fIbase_dir\fR\fR


 399 .RE
 400 
 401 .sp
 402 .ne 2
 403 .na
 404 \fB\fB-u\fR \fIuid\fR\fR
 405 .ad
 406 .sp .6
 407 .RS 4n
 408 The \fBUID\fR of the new user. This \fBUID\fR must be a non-negative decimal
 409 integer below \fBMAXUID\fR as defined in \fB<sys/param.h>\fR\&. The \fBUID\fR
 410 defaults to the next available (unique) number above the highest number
 411 currently assigned. For example, if \fBUID\fRs 100, 105, and 200 are assigned,
 412 the next default \fBUID\fR number will be 201. \fBUID\fRs \fB0\fR-\fB99\fR are
 413 reserved for allocation by the Solaris Operating System.
 414 .RE
 415 
 416 .SH FILES
 417 .sp
 418 .LP



 419 \fB/etc/datemsk\fR
 420 .sp
 421 .LP
 422 \fB/etc/passwd\fR
 423 .sp
 424 .LP
 425 \fB/etc/shadow\fR
 426 .sp
 427 .LP
 428 \fB/etc/group\fR
 429 .sp
 430 .LP
 431 \fB/etc/skel\fR
 432 .sp
 433 .LP
 434 \fB/usr/include/limits.h\fR
 435 .sp
 436 .LP
 437 \fB/etc/user_attr\fR
 438 .SH ATTRIBUTES


   1 '\" te
   2 .\" Copyright (c) 2013 Gary Mills
   3 .\" Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
   4 .\" Copyright 1989 AT&T
   5 .\" 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.
   6 .\" 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.
   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 .TH USERADD 1M "Apr 16, 2013"
   9 .SH NAME
  10 useradd \- administer a new user login on the system
  11 .SH SYNOPSIS
  12 .LP
  13 .nf
  14 \fBuseradd\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  15      [\fB-b\fR \fIbase_dir\fR] [\fB-c\fR \fIcomment\fR] [\fB-d\fR \fIdir\fR] [\fB-e\fR \fIexpire\fR]
  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]
  18      [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  19      [\fB-s\fR \fIshell\fR] [\fB-u\fR \fIuid\fR [\fB-o\fR]] \fIlogin\fR
  20 .fi
  21 
  22 .LP
  23 .nf
  24 \fBuseradd\fR \fB-D\fR [\fB-A\fR \fIauthorization\fR [,\fIauthorization...\fR]]
  25      [\fB-b\fR \fIbase_dir\fR] [\fB-s\fR \fIshell\fR [\fB-k\fR \fIskel_dir\fR]] [\fB-e\fR \fIexpire\fR]
  26      [\fB-f\fR \fIinactive\fR] [\fB-g\fR \fIgroup\fR] [\fB-K\fR \fIkey=value\fR] [\fB-p\fR \fIprojname\fR]
  27      [\fB-P\fR \fIprofile\fR [,\fIprofile...\fR]] [\fB-R\fR \fIrole\fR [,\fIrole...\fR]]
  28 .fi


  43 (\fB-G\fR option) and creates the home directory (\fB-m\fR option) for the user
  44 if requested. The new login remains locked until the \fBpasswd\fR(1) command is
  45 executed.
  46 .sp
  47 .LP
  48 Specifying \fBuseradd\fR \fB-D\fR with the \fB-s\fR, \fB-k\fR,\fB-g\fR,
  49 \fB-b\fR, \fB-f\fR, \fB-e\fR, \fB-A\fR, \fB-P\fR, \fB-p\fR, \fB-R\fR, or
  50 \fB-K\fR option (or any combination of these options) sets the default values
  51 for the respective fields. See the \fB-D\fR option, below. Subsequent
  52 \fBuseradd\fR commands without the \fB-D\fR option use these arguments.
  53 .sp
  54 .LP
  55 The system file entries created with this command have a limit of 2048
  56 characters per line. Specifying long arguments to several options can exceed
  57 this limit.
  58 .sp
  59 .LP
  60 \fBuseradd\fR requires that usernames be in the format described in
  61 \fBpasswd\fR(4). A warning message is displayed if these restrictions are not
  62 met. See \fBpasswd\fR(4) for the requirements for usernames.
  63 .LP
  64 To change the action of \fBuseradd\fR when the traditional login name
  65 length limit of eight characters is exceeded, edit the file
  66 \fB/etc/default/useradd\fR by removing the \fB#\fR (pound sign) before the
  67 appropriate \fBEXCEED_TRAD=\fR entry, and adding it before the others.
  68 .SH OPTIONS
  69 .sp
  70 .LP
  71 The following options are supported:
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB-A\fR \fIauthorization\fR\fR
  76 .ad
  77 .sp .6
  78 .RS 4n
  79 One or more comma separated authorizations defined in \fBauth_attr\fR(4). Only
  80 a user or role who has \fBgrant\fR rights to the authorization can assign it to
  81 an account.
  82 .RE
  83 
  84 .sp
  85 .ne 2
  86 .na
  87 \fB\fB-b\fR \fIbase_dir\fR\fR


 405 .RE
 406 
 407 .sp
 408 .ne 2
 409 .na
 410 \fB\fB-u\fR \fIuid\fR\fR
 411 .ad
 412 .sp .6
 413 .RS 4n
 414 The \fBUID\fR of the new user. This \fBUID\fR must be a non-negative decimal
 415 integer below \fBMAXUID\fR as defined in \fB<sys/param.h>\fR\&. The \fBUID\fR
 416 defaults to the next available (unique) number above the highest number
 417 currently assigned. For example, if \fBUID\fRs 100, 105, and 200 are assigned,
 418 the next default \fBUID\fR number will be 201. \fBUID\fRs \fB0\fR-\fB99\fR are
 419 reserved for allocation by the Solaris Operating System.
 420 .RE
 421 
 422 .SH FILES
 423 .sp
 424 .LP
 425 \fB/etc/default/useradd\fR
 426 .sp
 427 .LP
 428 \fB/etc/datemsk\fR
 429 .sp
 430 .LP
 431 \fB/etc/passwd\fR
 432 .sp
 433 .LP
 434 \fB/etc/shadow\fR
 435 .sp
 436 .LP
 437 \fB/etc/group\fR
 438 .sp
 439 .LP
 440 \fB/etc/skel\fR
 441 .sp
 442 .LP
 443 \fB/usr/include/limits.h\fR
 444 .sp
 445 .LP
 446 \fB/etc/user_attr\fR
 447 .SH ATTRIBUTES