1luseradd(1) General Commands Manual luseradd(1)
2
3
4
6 luseradd - Add an user
7
8
10 luseradd [OPTION]... user
11
12
14 Adds an user with name user.
15
16
18 -c, --gecos=gecos
19 Set the GECOS field to gecos. The GECOS field is traditionally
20 used to store user's real name and other information.
21
22
23 -d, --directory=directory
24 Set user's home directory to directory. If this option is not
25 present, a default specified by libuser configuration is used.
26
27
28 -g, --gid=group
29 Set user's primary group to group. group can either be a group
30 ID of an existing group, or a group name; if group is a group
31 name and the group does not exist, it is created. If the --gid
32 option is not specified, the default group name is user.
33
34
35 -i, --interactive
36 Ask all questions when connecting to the user database, even if
37 default answers are set up in libuser configuration.
38
39
40 -k, --skeleton=directory
41 Populate the newly created user's home directory with a copy of
42 directory. If this option is not present, a default directory
43 specified by libuser configuration, or /etc/skel if libuser con‐
44 figuration does not specify a default, is used.
45
46
47 -M, --nocreatehome
48 Don't create a home directory and a mail spool for the newly
49 created user.
50
51
52 -n, --nocreategroup
53 If a group is not specified using -g, use group name "users"
54 instead of user. Note that despite the name of the option, the
55 group will still be created if it does not exist.
56
57
58 -P, --plainpassword=password
59 Set user's password to password. Note that the password can be
60 viewed while running luseradd using tools such as ps(1).
61
62
63 -p, --password=encrypted
64 Set user's password to the password represented by the hash
65 encrypted. Note that the hash can be viewed while running
66 luseradd using tools such as ps(1).
67
68
69 -r, --reserved
70 The user is a system user. Users that are not marked as system
71 user usually have automatically selected user IDs above a cer‐
72 tain value (configured as LU_UIDNUMBER in libuser.conf(5)).
73 This information is also passed to the libuser backends. This
74 option implies the -M option.
75
76
77 -s, --shell=shell
78 Set user's login shell to shell. If this option is not present,
79 a default specified by libuser configuration is used.
80
81
82 -u, --uid=uid
83 Use user ID uid for the newly created user. An user ID is
84 selected automatically if this option is not present.
85
86
87 --commonname=name
88 Use common name name for the newly created user. This attribute
89 is only supported in some backends (e.g.LDAP), and its support
90 may have further limitations (e.g. LDAP schema rules).
91
92
93 --givenname=name
94 Use given name name for the newly created user. This attribute
95 is only supported in some backends (e.g.LDAP), and its support
96 may have further limitations (e.g. LDAP schema rules).
97
98
99 --homephone=phone
100 Use home telephone number phone for the newly created user.
101 This attribute is only supported in some backends (e.g.LDAP),
102 and its support may have further limitations (e.g. LDAP schema
103 rules).
104
105
106 --roomnumber=room
107 Use room number room for the newly created user. This attribute
108 is only supported in some backends (e.g.LDAP), and its support
109 may have further limitations (e.g. LDAP schema rules).
110
111
112 --surname=name
113 Use surname name for the newly created user. This attribute is
114 only supported in some backends (e.g.LDAP), and its support may
115 have further limitations (e.g. LDAP schema rules).
116
117
118 --telephonenumber=phone
119 Use telephone number phone for the newly created user. This
120 attribute is only supported in some backends (e.g.LDAP), and its
121 support may have further limitations (e.g. LDAP schema rules).
122
123
125 The exit status is 0 on success, nonzero on error.
126
127
128
129libuser 2009-12-09 luseradd(1)