1
.\" A man page for luseradd
2
.\" Copyright (C) 2005 Red Hat, Inc.
4
.\" This is free software; you can redistribute it and/or modify it under
5
.\" the terms of the GNU Library General Public License as published by
6
.\" the Free Software Foundation; either version 2 of the License, or
7
.\" (at your option) any later version.
9
.\" This program is distributed in the hope that it will be useful, but
10
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
11
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
.\" General Public License for more details.
14
.\" You should have received a copy of the GNU Library General Public
15
.\" License along with this program; if not, write to the Free Software
16
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
.\" Author: Miloslav Trmac <mitr@redhat.com>
19
.TH luseradd 1 "Jan 12 2005" libuser
25
luseradd [\fIOPTION\fR]... \fIuser\fR
28
Adds an user with name \fIuser\fR.
32
\fB\-c\fR, \fB\-\-gecos\fR=\fIgecos\fR
33
Set the \f[SM]GECOS\fR field to \fIgecos\fR.
34
The \f[SM]GECOS\fR field is traditionally used to store user's real name
35
and other information.
38
\fB\-d\fR, \fB\-\-directory\fR=\fIdirectory\fR
39
Set user's home directory to \fIdirectory\fR.
40
If this option is not present,
41
a default specified by
43
configuration is used.
46
\fB\-g\fR, \fB\-\-gid\fR=\fIgroup\fR
47
Set user's primary group to \fIgroup\fR.
48
\fIgroup\fR can either be a group ID of an existing group, or a group name;
49
if \fIgroup\fR is a group name and the group does not exist,
51
If the \fB\-\-gid\fR option is not specified,
52
the default group name is \fIuser\fR.
55
\fB\-i\fR, \fB\-\-interactive\fR
56
Ask all questions when connecting to the user database,
57
even if default answers are set up in
62
\fB\-k\fR, \fB\-\-skeleton\fR=\fIdirectory\fR
63
Populate the newly created user's home directory with a copy of
65
If this option is not present,
66
a default directory specified by
71
configuration does not specify a default,
75
\fB\-M\fR, \fB\-\-nocreatehome\fR
76
Don't create a home directory and a mail spool for the newly created user.
79
\fB\-n\fR, \fB\-\-nocreategroup\fR
80
If a group is not specified using \fB\-g\fR,
81
use group name "users" instead of \fIuser\fR.
82
Note that despite the name of the option,
83
the group will still be created if it does not exist.
86
\fB\-P\fR, \fB\-\-plainpassword\fR=\fIpassword\fR
87
Set \fIuser\fR's password to \fIpassword\fR.
88
Note that the password can be viewed while running
94
\fB\-p\fR, \fB\-\-password\fR=\fIencrypted\fR
95
Set \fIuser\fR's password to the password represented by the hash
97
Note that the hash can be viewed while running
103
\fB\-r\fR, \fB\-\-reserved\fR
104
The user is a system user.
105
Users that are not marked as system user
106
usually have automatically selected user IDs above a certain value
108
This information is also passed to the
111
This option implies the \fB\-M\fR option.
114
\fB\-s\fR, \fB\-\-shell\fR=\fIshell\fR
115
Set user's login shell to \fIshell\fR.
116
If this option is not present,
117
a default specified by
119
configuration is used.
122
\fB\-u\fR, \fB\-\-uid\fR=\fIuid\fR
123
Use user ID \fIuid\fR for the newly created user.
124
An user ID is selected automatically if this option is not present.
127
The exit status is 0 on success, nonzero on error.