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)
EXAMPLES
Add the user otto to the system with all of the default attributes.
useradd otto
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 set-
ting the permissions of that directory to 775 (i.e. 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. Oth-
erwise,
useradd will report an error.
As many users may try to write the /etc/passwd file simultaneously, a passwd locking mechanism was
deviced. If this locking fails after subsequent retrying, useradd terminates.
A group entry in the /etc/group file can have maximum of LINE_MAX bytes. 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/passwd
/etc/skel
/etc/group
/etc/ptmp
SEE ALSO
passwd(1), users(1), groupadd(1M), groupdel(1M), groupmod(1M), logins(1M), userdel(1M), usermod(1M),
group(4).
STANDARDS COMPLIANCE
useradd: SVID3
Section 1M−−984 − 3 − HP-UX Release 11i: December 2000
___
___