When run with this flag, useradd refrains from
actually creating a new user account; instead, it saves any additionally supplied options as the new
default values in /etc/login.defs. Not all useradd options can be used in conjunction with
the -D option. You can use only the five options listed in Table 4-3.
TABLE 4-3
useradd Options for Changing User Defaults
Options Description
-b default_home Set the default directory in which user home directories are created.
Replace default_home with the directory name to use (-b garage).
Usually this is /home.
-e default_expire_date Set the default expiration date on which the user account is disabled. The
default_expire_date value should be replaced with a date in the
form MM/DD/YYYY (-e 10/15/2008).
continued
153
Learning Basic Administration 4
TABLE 4-3 (continued)
Option Description
-f default_inactive Set the number of days after a password has expired before the account is
disabled. Replace default_inactive with a number representing the
number of days (-f 7).
-g default_group Set the default group that new users will be placed in. Typically, useradd
creates a new group with the same name and ID number as the user.
Replace default_group with the group name to use (-g bears).
-s default_shell Set the default shell for new users.
Pages:
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363