O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing Defaults

Useradd has certain defaults that may be either displayed or modified by invoking the command with the -D option. (Display only if no other options are provided; otherwise, the options are set as specified.)

-b default_home Specify an initial path for new home directories.
-e default_expire_date Specify a new account expiration date.
-f default_inactive Specify the number of days to wait after a password expired before cancelling an account.
-g default_group Specify a default group for new users.
-s default_shell Specify a new user's default login shell.

userdel

[-r] login

Delete the specified login account. All entries pertaining to the specified user are deleted from system account files.

Example: To remove the user postalguy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required