useradd(1M) DG/UX 5.4R3.00 useradd(1M)
NAME
useradd - administer a new user login on the system
SYNOPSIS
useradd [-y] [-u uid [-o]] [-g group] [-G group[,group...] [-d dir]
[-S dirsize] [-s shell] [-c comment] [-m [-k skeldir]] login
useradd -D [-g group] [-b basedir] [-S dirsize]
DESCRIPTION
Invoking useradd without the -D option adds a new user entry to the
/etc/passwd file. It also creates supplementary group memberships
for the user (-G option) and creates the home directory (-m option)
for the user if requested. The new login remains locked until the
passwd(1) command is executed.
Invoking useradd -D with no additional options displays the default
values for group, basedir, skeldir, shell, and dirsize. The
values for group, basedir, shell, and dirsize are used for
invocations without the -D option.
Invoking useradd -D with -g or -b (or any combination of these) sets
the default values for the respective fields. [As installed, the
default group is general (group ID of 100) and the default value of
basedir is /home]. Subsequent invocations of useradd without the -D
option use these arguments.
The system file entries created with this command have a limit of 512
characters per line. Specifying long arguments to several options
may exceed this limit.
The following options are available:
-y Perform the requested operation on the global NIS (YP)
database. Without this option, the requested operation
is performed on the local database in the /etc directory.
This option is valid only when the machine on which the
command is run is the NIS master. The -y option uses the
default source directory derived from the SRC_DIR
variable specified in the NIS makefile
(/etc/yp/Makefile).
-u uid The UID of the new user. This UID must be a non-negative
decimal integer below MAXUID as defined in <sys/param.h>.
The UID defaults to the next available (unique) number
above the highest number currently assigned. For
example, if UIDs 100, 105, and 200 are assigned, the next
default UID number will be 201. (UIDs from 0-99 are
reserved.)
-o This option allows a UID to be duplicated (non-unique).
-g group An existing group's integer ID or character-string name.
Without the -D option, it defines the new user's primary
Licensed material--property of copyright holder(s) 1
useradd(1M) DG/UX 5.4R3.00 useradd(1M)
group membership and defaults to the default group. You
can reset this default value by invoking useradd -D -g
group.
-G group An existing group's integer ID or character-string name.
It defines the new user's supplementary group membership.
Duplicates between group with the -g and -G options are
ignored. No more than NGROUPSMAX groups may be
specified.
-d dir The home directory of the new user. It defaults to
basedir/login, where basedir is the base directory for
new login home directories and login is the new login.
-S dirsize Specifies whether the home directory should be created as
a control point directory, and, if so, the size in blocks
of the control point directory. If this value is 0, a
regular directory will be created; otherwise, a control
point directory with a maximum block allocation of
dirsize blocks will be created. This option is
meaningful only when creating the home directory with the
-m option.
-s shell Full pathname of the program used as the user's shell on
login. It defaults to an empty field causing the system
to use /usr/bin/sh as the default. The value of shell
must be a valid executable file.
-c comment Any text string. It is generally a short description of
the login, and is currently used as the field for the
user's full name. This information is stored in the
user's /etc/passwd entry.
-m Create the new user's home directory if it doesn't
already exist. If the directory already exists, it must
have read, write, and execute permissions by group, where
group is the user's primary group.
-k skeldir A directory that contains skeleton information (such as
.profile) that can be copied into a new user's home
directory. This directory must exist. The system
provides a ``skel'' directory (/etc/skel) that can be
used for this purpose.
login A string of printable characters that specifies the
existing login name of the user. It must exist and may
not contain a colon (:) or a newline (\n).
login A string of printable characters that specifies the new
login name of the user. It may not contain a colon (:)
or a newline (\n).
-b basedir The default base directory for the system. If -d dir is
not specified. basedir is concatenated with the user's
Licensed material--property of copyright holder(s) 2
useradd(1M) DG/UX 5.4R3.00 useradd(1M)
login to define the home directory. If the -m option is
not used, basedir must exist.
FILES
/etc/passwd
/etc/group
/etc/skel
DIAGNOSTICS
The useradd command exits with one of the following values:
0 The command was executed successfully.
2 The command line syntax was invalid. A usage message for the
useradd command is displayed.
3 An invalid argument was provided with an option.
4 The uid specified with the -u option is already in use.
6 The group specified with the -g option does not exist.
9 The specified login is not unique.
10 Cannot update /etc/group. The login was added to the
/etc/passwd file but not to the /etc/group file.
12 Unable to create the home directory (with the -m option) or
unable to complete the copy of skeldir to the home directory.
SEE ALSO
groupadd(1M), groupdel(1M), groupmod(1M), listusers(1), logins(1M),
passmgmt(1M), passwd(1), userdel(1M), usermod(1M).
Licensed material--property of copyright holder(s) 3