ADDUSER.CONF(5)
๐ ADDUSER.CONF(5) ๐
okay so bestie, buckle up โ this is the manual page for /etc/adduser.conf, living in the File Formats Manual section (ADDUSER.CONF(5), iykyk). it's the little file that runs the whole vibe for a bunch of user-management tools, and we're gonna read it together. no cap. ๐ซถ
โจ NAME โจ
/etc/adduser.conf โ the configuration file for adduser(8) and addgroup(8). that's it, that's the name. iconic.
๐ธ DESCRIPTION ๐ธ
so <hotpink>/etc/adduser.conf holds all the defaults for adduser(8), addgroup(8), deluser(8) and delgroup(8). four programs, one config file, main character energy fr fr. ๐
the formatting rules are lowkey simple:
- every line is a single value pair, shaped like
option = value. - you're allowed to wrap the value in double quotes or single quotes โ your call, both slay.
- whitespace around the equals sign? totally fine, go off.
- comment lines must have a hash sign (#) in the very first column. first column only, bestie, don't try to be sneaky.
and now, the valid configuration options โ there are a LOT, so hydrate and let's go ๐:
STDERRMSGLEVEL,STDOUTMSGLEVEL, andLOGMSGLEVELโ the minimum priority for messages logged to syslog/journal and the console, respectively. peep LOGGING inadduser(8)for the deets. defaults towarnforSTDOUTMSGLEVELandSTDERRMSGLEVEL, andinfoforLOGMSGLEVEL.ADD_EXTRA_GROUPSโ set this to literally anything other than0andadduserwill drop newly created non-system users into the group list defined byEXTRA_GROUPS(right below). defaults to0.DIR_MODEโ the permissions mode for home directories of non-system users made byadduser(8). defaults to0700. โ ๏ธ heads up: there are potential configurations (think~/userweb services, or in-home mail delivery) that will require you to change the default. see alsoSYS_DIR_MODE.DHOMEโ the directory where all the new home directories get created. defaults to/home. ๐DSHELLโ the login shell used for all new users. defaults to/bin/bash. ๐EXTRA_GROUPSโ the space-separated list of groups that new non-system users get added to. defaults tousers.FIRST_SYSTEM_GIDandLAST_SYSTEM_GIDโ specify an inclusive range of GIDs that system groups can be dynamically allocated from. defaults to100 - 999.FIRST_GIDandLAST_GIDโ specify an inclusive range of GIDs that non-system groups can be dynamically allocated from. defaults to1000 - 59999.FIRST_SYSTEM_UIDandLAST_SYSTEM_UIDโ specify an inclusive range of UIDs that system users can be dynamically allocated from. defaults to100 - 999. ๐ please note: system software โ like the users allocated by thebase-passwdpackage โ may assume that UIDs less than 100 are unallocated. so don't get cute down there.FIRST_UIDandLAST_UIDโ specify an inclusive range of UIDs that non-system users can be dynamically allocated from. defaults to1000 - 59999.GID_POOLโ seeUID_POOL. (they're a package deal, your honor ๐)LAST_SYSTEM_GID,LAST_GID,LAST_SYSTEM_UID,LAST_UIDโ see theFIRST_variants of the option. yeah, they get their own listing, we don't make the rules.NAME_REGEXโ non-system user- and groupnames get checked against this regular expression. if the name doesn't match this regexp, user and group creation inadduser(8)is refused unless--allow-bad-namesis set. with--allow-bad-namesset, weaker checks are performed. defaults to the most conservative^[a-zA-Z][a-zA-Z0-9_-]*\$?$. seeSYS_NAME_REGEXand Valid names, below, for more info. ๐ฅRESERVE_UID_POOLandRESERVE_GID_POOLโ controls whether the UID and GID values listed in the pool files are truly reserved. see UID AND GID POOLS in the NOTES section. defaults toyes.SKELโ the directory that skeletal user configuration files get copied from. defaults to/etc/skel. ๐ฆSKEL_IGNORE_REGEXโ when the newly created home directory of a non-system user gets populated, files inSKELmatching this regex are not copied. defaults to(.(dpkg|ucf)-(old|new|dist)$), the regex that matches files left over from unmerged config files.SYS_DIR_MODEโ the permissions mode for home directories of system users created byadduser(8). defaults to0755. โ ๏ธ note that changing the default permissions for system users may cause some packages to behave unreliably, if the program relies on the default setting. see alsoDIR_MODE.SYS_NAME_REGEXโ system user- and groupnames get checked against this regular expression. if the name doesn't match this regexp, system user and group creation inadduseris refused unless--allow-bad-namesis set. with--allow-bad-namesset, weaker checks are performed. defaults to the most conservative^[a-zA-Z_][a-zA-Z0-9_-]*\$?$. seeNAME_REGEX, above, and Valid names, below, for more info.UID_POOLandGID_POOLโ specify a file or a directory containing UID and GID pool files. see UID AND GID POOLS in the NOTES section. both default to empty.USERGROUPSโ specifies whether each created non-system user gets given their own group to use. defaults toyes.USERS_GIDandUSERS_GROUPโ defines the groupname or GID of the group that all newly-created non-system users get placed into. ifUSERGROUPSisyes, the group will be added as a supplementary group; ifUSERGROUPSisno, it will be the primary group. if you don't want all your users hanging out in one group, setUSERGROUPS=yes, leaveUSERS_GROUPempty, and setUSERS_GIDto"-1".USERS_GROUPdefaults tousers, which has GID100on all Debian systems since it's defined statically by thebase-passwdpackage. ๐จ it is a configuration error to define both variables โ even if the values are consistent. pick one, bestie.
๐ NOTES ๐
๐ UID AND GID POOLS ๐
some installations want a non-system account to come pre-loaded with preconfigured properties the moment it's generated. usually the local admin just wants to make sure that โ even without using a directory service โ an account or a group with a certain name ends up with the same numeric UID/GID on every system where it exists. consistency is the vibe. โจ
to turn this feature on, define the config variables UID_POOL (for user accounts) and/or GID_POOL (for groups) in /etc/adduser.conf, then install the respective files in the configured places. the value is either a file or a directory. if it's a directory, all files named *.conf inside it get considered. ๐
the file format is similar to /etc/passwd: text lines, with fields separated by a colon. the values are:
- username/groupname โ mandatory
- UID/GID โ mandatory
- comment field โ optional, useful for user IDs only
- home directory โ ditto
- shell โ ditto
you can use the same file/directory for both UID_POOL and GID_POOL. but you cannot copy lines from /etc/passwd or /etc/group, because pool file lines have fewer fields. so close, yet so far ๐.
when an account / group gets created, adduser(8) searches through all the UID/GID pool files for a line matching the name of the shiny new account, and uses the data it finds there to initialize the new account instead of using the defaults. settings may be overridden from the command line. ๐
in the default configuration, the UID and GID values listed in the pool will be reserved, and thus won't be used by the normal UID and GID selection processes. that's usually exactly what you'd want. with the RESERVE_UID_POOL and RESERVE_GID_POOL configuration options, you can switch this behavior off if you want pooled UIDs and GIDs to be used by regular accounts. but heads up: this might cause conflicts, and it might cause your pool UIDs and GIDs to get used by accounts that are not in the pool. ๐
๐ FILES ๐
/etc/adduser.conf
๐ SEE ALSO ๐
deluser.conf(5), addgroup(8), adduser(8), delgroup(8), deluser(8)
and that's the whole page, bestie, you ate that ๐ this lil' gem ships with Debian GNU/Linux, and the page is literally called ADDUSER.CONF(5) โ go forth and configure responsibly ๐
โจ๐ซถ
๐ฆ where this page comes from
- ubuntu stonking: adduser 3.157ubuntu2 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms