+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.
+.TP 3n
\fB\-g\fR \fIGID\fR
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.
-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 useradd command will update system files and may also create the new user's home directory and copy initial files.
+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 useradd 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
@@ -65,7 +65,7 @@
The number of days after a password expires until the account is permanently disabled. A value of 0 disables the account as soon as the password has expired, and a value of \-1 disables the feature. The default value is \-1.
.TP 3n
\fB\-g\fR, \fB\-\-gid\fR \fIGROUP\fR
-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.
+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.
+.TP 3n
\fB\-m\fR, \fB\-\-create\-home\fR
The user's home directory will be created if it does not exist. The files contained in
\fISKEL_DIR\fR
@@ -93,6 +96,9 @@
\fB\-m\fR
option. The default is to not create the directory and to not copy any files.
.TP 3n
+\fB-n\fR
+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.
+.TP 3n
\fB\-K\fR, \fB\-\-key\fR \fIKEY\fR=\fIVALUE\fR
Overrides /etc/login.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others).
@@ -118,6 +124,9 @@
The encrypted password, as returned by
\fBcrypt\fR(3). The default is to disable the account.
.TP 3n
+\fB-r\fR
+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
+.TP 3n
\fB\-s\fR, \fB\-\-shell\fR \fISHELL\fR
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.
.TP 3n
@@ -161,6 +170,8 @@
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 group. This must be performed on the NIS server.
-By default the supplied password must be in clear\-text. Default encryption algorithm is DES. Also the password age will be updated, if present.
+By default the supplied password must be in clear\-text. Default encryption algorithm is DES, but this setting can be changed in \fI/etc/login.defs\fR. Red Hat uses MD5 to encrypt passwords by default. Also the password age will be updated, if present.
.PP
This command is intended to be used in a large system environment where many accounts are created at a single time.
This field will be checked for existence as a directory and a new directory with the same name will be created if it does not already exist. The ownership of the directory will be set to be that of the user being created or updated.
.PP
This command is intended to be used in a large system environment where many accounts are updated at a single time.
+.PP
+Default encryption algorithm is DES, but this setting can be changed in \fI/etc/login.defs\fR. Red Hat uses MD5 to encrypt passwords by default.
.SH "CAVEATS"
.PP
The input file must be protected since it contains unencrypted passwords.