useradd.1m (2010 09)

u
useradd(1M) useradd(1M)
Add the user otto to the system with a UID of
222 and a primary group of staff.
useradd -u 222 -g staff otto
List the defaults for the primary group, base directory, inactivity timeout, and skeleton directory.
useradd -D
Change the default primary group to staff.
useradd -D -g staff
WARNINGS
A directory can be shared between the users belonging to the same group. If the home directory is in the
unshared mode and a new user is allocated to that directory then it will be put into the shared mode by
setting the permissions of that directory to 775
(includes the write permissions to the group as well).
Also, the directory which will be shared should have read and execute permissions for the group. Other-
wise,
useradd will report an error.
Because many users may try to write the
/etc/passwd file simultaneously, a password locking
mechanism was devised. If this password locking fails after subsequent retrying,
useradd terminates.
A group entry in the
/etc/group file can have maximum of
LINE_MAX bytes. See limits (5) for the
value of
LINE_MAX. If a user is added to a group that has reached LINE_MAX
limit, another entry of the
same group is created to which the new user is added. A warning message is also issued.
FILES
/etc/shadow Shadow Password file
/etc/passwd System Password file
/etc/skel Skeleton directory
/etc/group System group file
/etc/ptmp Lock file used when updating password file
SEE ALSO
passwd(1), users(1), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), pwconv(1M), userdel(1M),
usermod(1M), crypt(3C), crypt2(3C), group(4), shadow(4), limits(5), usergroupname(5).
STANDARDS CONFORMANCE
useradd: SVID3
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010