HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
u
useradd(1M) useradd(1M)
A value of ’’’’ defeats the expired date status.
-D Manages the defaults for various options. When useradd is invoked with this option
only, the default values for group, base_dir, skel_dir, shell, inactive, and expire are
displayed. Invoking useradd with this option and other allowed options sets the
default values for those options.
-b base_dir Specifies the default base directory for the system. If -d dir is not specified, base_dir
is concatenated with the new login name to define the path of the new home directory.
base_dir must exist.
The useradd command may be used with the login argument, where login is the new login name,
specified as a string of printable characters. It may not contain a colon (:) or a newline (\n).
Unless enhanced security is installed (see pwconv(1M)), the -e and -f options are not supported and will
return an error.
Networking Features
NIS
This command is aware of NIS user and group entries. Only local users and groups may be modified with
this command. Attempts to modify an NIS user or group will result in an error. NIS users and groups
must be administered from the NIS server. NIS users are checked when verifying uniqueness of the new
UID or new user name, which may result in the error
login x not unique
(return value 9), or the error
UID # is not unique (when -o is not used)
(return value 4) even though the user or UID is not present in the local /etc/passwd file. The error
Cannot modify /etc/group file, /etc/passwd was modified
(return value 10) is returned if a group specified with either the -g option or the
-G option is an NIS group
(see group(4)).
NFS
Errors may occur with the -m or -k options if the indicated directory is within an NFS mounted file system
that does not allow root privileges across the NFS mount, and the directory or files within the directory do
not have sufficient permissions.
RETURN VALUE
useradd exits with one of the following values:
0 Successful completion.
2 Invalid command syntax.
3 Invalid argument supplied to an option.
4 uid is not unique (when -o is not used).
6 The group specified with the -g option does not exist.
9 login is not unique.
10 Cannot modify the /etc/group file. The login was added to the /etc/passwd file, but not
to the
/etc/group file.
12 Unable to create the home directory (while using the -m option) or unable to complete the copy
of skel_dir to the new home directory.
13 Unable to open /etc/ptmp file or /etc/default file, or /etc/passwd file is non-
existent.
14 /etc/passwd,or/etc/ptmp,or/etc/default file busy. Another command may be
modifying the /etc/passwd file.
16 Cannot add the entry into the /etc/passwd file.
HP-UX Release 11i: December 2000 − 2 − Section 1M−−983
___
___