1 .\" $NetBSD: usermod.8,v 1.32 2009/03/11 17:54:03 dyoung Exp $ */
3 .\" Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote
14 .\" products derived from this software without specific prior written
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 .Nd modify user login information
42 .Op Fl e Ar expiry-time
43 .Op Fl f Ar inactive-time
44 .Op Fl G Ar secondary-group
45 .Op Fl g Ar gid | name | Li =uid
46 .Op Fl L Ar login-class
55 utility modifies user login information on the system.
57 Default values are taken from the information provided in the
58 .Pa /etc/usermgmt.conf
59 file, which, if running as root, is created using the built-in defaults if
64 for more information about
67 After setting any defaults, and then reading values from
68 .Pa /etc/usermgmt.conf ,
69 the following command line options are processed:
72 Enable user accounts to be temporary locked/closed.
75 operand can be given as
77 to lock the account or
79 to unlock the account.
81 Set the comment field (also, for historical reasons known as the
82 GECOS field) for the user.
83 The comment field will typically include
84 the user's full name and, perhaps, contact information for the user.
85 .It Fl d Ar home-directory
86 Set the home directory without populating it; if the
88 option is specified, tries to move the old home directory to
90 .It Fl e Ar expiry-time
91 Set the time at which the account expires.
92 This can be used to implement password aging.
93 It should be entered in the form
95 where month is the month name (the first three characters are
96 sufficient), day is the day of the month, and year is the year.
97 Time in seconds since the epoch (UTC) is also valid.
98 A value of 0 can be used to disable this feature.
99 This value can be preset for all users using the
102 .Pa /etc/usermgmt.conf
108 Force the user to change their password upon next login.
109 .It Fl f Ar inactive-time
110 Set the time at which the password expires.
114 .It Fl G Ar secondary-group
115 Specify a secondary group to which the user will be added in the
120 may be a comma-delimited list for multiple groups.
121 Or the option may be repeated for multiple groups.
123 .It Fl g Ar gid | name | Li =uid
124 Give the group name or identifier to be used for the user's primary group.
127 then a uid and gid will be picked which are both unique
128 and the same, and a line will be added to
130 to describe the new group.
131 This value can be preset for all users by using the
134 .Pa /etc/usermgmt.conf
139 .It Fl L Ar login-class
140 Set the login class for the user.
143 for more information on user login classes.
144 This value can be preset for all users by using the
147 .Pa /etc/usermgmt.conf
152 This option is included if built with
155 Give the new user name.
156 It can consist of alphanumeric characters and the characters
162 Move the home directory from its old position to the new one.
165 is not specified, the
169 option is used; one of
175 Allow duplicate uids to be given.
177 Specify an already-encrypted password for the user.
178 This password can then be changed by using the
181 This value can be preset for all users by using the
184 .Pa /etc/usermgmt.conf
189 This option is included if built with
192 Allow samba user names with a trailing dollar sign to be modified.
193 This option is included if built with
196 Specify the login shell for the user.
197 This value can be preset for all users by using the
200 .Pa /etc/usermgmt.conf
206 Specify a new uid for the user.
207 Boundaries for this value can be preset for all users by using the
210 .Pa /etc/usermgmt.conf
216 Enable verbose mode - explain the commands as they are executed.
217 This option is included if built with
221 Once the information has been verified,
225 to update the user database.
226 This is run in the background.
227 At very large sites this can take several minutes.
229 is completed, the password file is unavailable for other updates
230 and the new information is not available to programs.
234 .Bl -tag -width /etc/usermgmt.conf -compact
235 .It Pa /etc/usermgmt.conf
241 .Xr usermgmt.conf 5 ,
249 utility first appeared in
253 package by the same author.
257 utility was written by
258 .An Alistair G. Crooks