DELUSER.CONF(5)

๐Ÿ’– DELUSER.CONF(5) ๐Ÿ’–

okay bestie, so this is deluser.conf, manual page 5 in the File Formats Manual series โ€” it's the lil config file that runs the whole show behind deluser(8) and delgroup(8). let's get into it ๐Ÿซถ


โœจ NAME โœจ

/etc/deluser.conf โ€” the configuration file for deluser(8) and delgroup(8). that's it, that's the name ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

so the file /etc/deluser.conf holds all the defaults for deluser(8) and delgroup(8). each line is one single value pair, and the form is literally:

option = value

double quotes or single quotes are allowed around the value, and you can put whitespace around the equals sign too โ€” she's flexible like that โœจ. comment lines though? they must have a hash sign (#) in the first column. first column only. no exceptions, no cozy indented comments, periodt.

also heads up: deluser(8) and delgroup(8) also read /etc/adduser.conf โ€” see adduser.conf(5) โ€” and any settings in deluser.conf may overwrite settings made in adduser.conf. so deluser.conf is the main character here, lowkey ๐Ÿ‘‘

the valid configuration options are, and yes we're going through every single one:

  • BACKUP โ€” if REMOVE_HOME or REMOVE_ALL_FILES is activated, all the files get backed up before they get removed. the backup file that gets created defaults to username.tar(.gz|.bz2) in the directory specified by the BACKUP_TO option. the compression method is chosen to the best that is available. values may be 0 or 1. defaults to 0. ๐Ÿ’พ
  • BACKUP_SUFFIX โ€” selects the compression algorithm for a home directory backup. can be set to any suffix recognized by tar --auto-compress. defaults to .gz. ๐Ÿ—œ๏ธ
  • BACKUP_TO โ€” if BACKUP is activated, BACKUP_TO says which directory the backup gets written to. defaults to the current directory. ๐Ÿ“
  • EXCLUDE_FSTYPES โ€” a regular expression that describes all the filesystem types which should be excluded when looking for files of a user to be deleted. defaults to "(proc|sysfs|usbfs|devtmpfs|devpts|afs)". ๐Ÿšซ
  • NO_DEL_PATHS โ€” a list of regular expressions, space separated. every file to be deleted in the course of deleting the home directory or user-owned files elsewhere gets checked against each of these regular expressions. if a match is detected, the file is not deleted. defaults to a list of system directories, leaving only /home. therefore only files below /home belonging to that specific user are going to be deleted. ๐Ÿ›ก๏ธ
  • ONLY_IF_EMPTY โ€” only delete a group if there are no users belonging to this group. defaults to 0. ๐Ÿ™ˆ
  • REMOVE_ALL_FILES โ€” removes all files on the system owned by the user to be removed. if this option is activated, REMOVE_HOME has no effect. values may be 0 or 1. defaults to 0. ๐Ÿ’€
  • REMOVE_HOME โ€” removes the home directory and mail spool of the user to be removed. value may be 0 (don't delete) or 1 (do delete). defaults to 0. ๐Ÿ 
  • SYS_DELETE_ACTION โ€” the default action to take when deleting system accounts. valid options are "lock" and "delete" (the default). if set to "lock" and not overridden by --force-delete, behave as if --lock were passed and lock the account. see deluser(8) for specific details. ๐Ÿ”’
ok real talk bestie, REMOVE_ALL_FILES and REMOVE_HOME are giving "no takebacks" energy โ€” those files are gone, so make sure that's what you actually want before you flip them to 1. ๐Ÿ˜ญ

๐Ÿ“‚ FILES ๐Ÿ“‚

  • /etc/deluser.conf

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


and that's the whole page, no notes ๐Ÿ’– this was Debian GNU/Linux's DELUSER.CONF(5), bestie โ€” go forth and configure responsibly, you absolute icon ๐Ÿ‘‘โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from