-command creates a new user account using the values specified on the command line plus the default values from the system\. Depending on command line options, the
+command creates a new user account using the values specified on the command line and the default values from the system. Depending on command line options, the
\fBuseradd\fR
-command will update system files and may also create the new user\'s home directory and copy initial files\.
+command will update system files and may also create the new user's home directory and copy initial files. The version provided with Red Hat Linux will create a group for each user added to the system by default.
.SH "OPTIONS"
.PP
The options which apply to the
@@ -84,7 +84,7 @@ The number of days after a password expi
.PP
\fB\-g\fR, \fB\-\-gid\fR \fIGROUP\fR
.RS 4
-The group name or number of the user\'s initial login group\. The group name must exist\. A group number must refer to an already existing group\. The default group number is 1 or whatever is specified in
+The group name or number of the user\'s initial login group\. The group name must exist\. A group number must refer to an already existing group\.
\fI/etc/default/useradd\fR\.
.RE
.PP
@@ -100,6 +100,13 @@ option\. The default is for the user to
Display help message and exit\.
.RE
.PP
+\fB-M\fR
+.RS 4
+The user\'s home directory will not be created, even if the system wide settings from
+\fI/etc/login.defs\fR
+is to create home dirs\.
+.RE
+.PP
\fB\-m\fR, \fB\-\-create\-home\fR
.RS 4
The user\'s home directory will be created if it does not exist\. The files contained in
@@ -119,6 +126,13 @@ option is only valid in conjunction with
option\. The default is to not create the directory and to not copy any files\.
.RE
.PP
+\fB-n\fR
+.RS 4
+A group having the same name as the user being added to the system will be created by default\. This option will turn off this Red Hat Linux specific behavior\. When this option is used, users by default will be placed in whatever group is specified in
+\fI/etc/default/useradd\fR\.
+If no default group is defined, group 1 will be used.
+.RE
+.PP
\fB\-K\fR, \fB\-\-key\fR \fIKEY\fR=\fIVALUE\fR
.RS 4
Overrides /etc/login\.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others)\.
@@ -150,6 +164,19 @@ The encrypted password, as returned by
\fBcrypt\fR(3)\. The default is to disable the account\.
.RE
.PP
+\fB-r\fR
+.RS 4
+This flag is used to create a system account\. That is, a user with a UID lower than the value of UID_MIN defined in
+\fI/etc/login.defs\fR
+and whose password does not expire\. Note that
+\fBuseradd\fR
+will not create a home directory for such an user, regardless of the default setting in
+\fI/etc/login.defs\fR\.
+You have to specify
+\fB-m\fR
+option if you want a home directory for a system account to be created\. This is an option added by Red Hat\.
+.RE
+.PP
\fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
.RS 4
The name of the user\'s login shell\. The default is to leave this field blank, which causes the system to select the default login shell\.
@@ -206,6 +233,8 @@ The name of a new user\'s login shell\.
The system administrator is responsible for placing the default user files in the
\fI/etc/skel/\fR
directory\.
+.br
+This version of useradd was modified by Red Hat to suit Red Hat user/group conventions\.
.SH "CAVEATS"
.PP
You may not add a user to a NIS or LDAP group\. This must be performed on the corresponding server\.
@@ -315,6 +344,11 @@ Secure user account information\.
@@ -34,11 +34,22 @@ This option causes the command to simply
is turned off)\.
.RE
.PP
+\fB-r\fR
+.RS 4
+This flag instructs
+\fBgroupadd\fR
+to add a system account\. The first available
+\fIgid\fR
+lower than 499 will be automatically selected unless the
+\fB-g\fR
+option is also given on the command line\. This is an option added by Red Hat\.
+.RE
+.PP
\fB\-g\fR \fIGID\fR
.RS 4
The numerical value of the group\'s ID\. This value must be unique, unless the
\fB\-o\fR
-option is used\. The value must be non\-negative\. The default is to use the smallest ID value greater than 999 and greater than every other group\. Values between 0 and 999 are typically reserved for system accounts\.
+option is used\. The value must be non\-negative\. The default is to use the smallest ID value greater than 500 and greater than every other group\. Values between 0 and 499 are typically reserved for system accounts\.