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 ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.