UPDATE-PASSWD(8)
๐ update-passwd (8) ๐
okay so update-passwd is the bestie that safely updates /etc/passwd, /etc/shadow and /etc/group โจ ๐
๐ฅ NAME ๐ฅ
update-passwd - safely update /etc/passwd, /etc/shadow and /etc/group ๐ซถ
๐ง SYNOPSIS ๐ง
update-passwd [options]
๐ DESCRIPTION ๐
okay bestie, so update-passwd handles updates of /etc/passwd, /etc/shadow and /etc/group on running Debian systems ๐ it compares your current files to the master copies that come with the base-passwd package, then updates every entry in the global system range (that's 0โ99) ๐ before it touches anything, it leaves backup copies of the old versions of modified files with the extension .org (short for "original") ๐ฅน so you always have a way back, no cap ๐ซถ
๐ฆ OPTIONS ๐ฆ
update-passwd follows the usual GNU command line syntax, so long options start with two dashes (--) ๐
the single dash (-) is for the short versions โจ
-p,--passwd-master=FILEโ uses FILE as the master copy of the passwd database ๐ the default is/usr/share/base-passwd/passwd.master-g,--group-master=FILEโ uses FILE as the master copy of the group database ๐ธ the default is/usr/share/base-passwd/group.master-P,--passwd=FILEโ uses FILE as the system passwd database ๐ the default is/etc/passwd-S,--shadow=FILEโ uses FILE as the system shadow database ๐ the default is/etc/shadow-G,--group=FILEโ uses FILE as the system group database ๐ซง the default is/etc/group-s,--sanity-checkโ only runs sanity checks, and that's it, it won't change anything ๐งผ-v,--verboseโ gives you the tea on what it's doing ๐ type a second-vfor even more detail ๐-n,--dry-runโ doesn't actually do anything, just shows you what it would do ๐ very safe, very cute-L,--no-lockingโ tells it not to lock the account database ๐ this is only for debugging. I'm going to say it again: do not do this unless you are really sure you need to ๐ญ
โ ๏ธ bestie, -L skips the locking. Only use it for debugging, and only if you are really, truly sure. Seriously. ๐
-h,--helpโ shows a quick summary of how to use update-passwd ๐ง-V,--versionโ shows the version number ๐
๐ ENVIRONMENT ๐
DEBIAN_HAS_FRONTENDโ if this environment variable is set and you didn't pass--dry-run, update-passwd uses debconf to ask you whether to make each change ๐ every proposed change gets its own prompt ๐ซถ removing users or groups, changing UIDs or GIDs, and changing home directories are asked with high priority ๐จ adding users or groups and changing shells are asked with medium priority โจ questions about moving entries above the NIS compat inclusion entry, or about changing a user's GECOS, are asked at low priority ๐
๐ BUGS ๐
okay so, the tea is that update-passwd does not verify the shadow-file yet ๐ญ it should check that the entries in passwd are also in shadow and vice versa, and that passwords aren't present in both files. not me having to wait for that fix ๐
๐ AUTHOR ๐
Wichert Akkerman <wakkerma@debian.org> ๐
this program was written for the Debian project ๐ it's copyright 1999โ2002 Wichert Akkerman and copyright 2002, 2003 Colin Watson ๐ it's distributed under version 2 of the GNU General Public License ๐ iykyk ๐ซถ
bestie, that's the whole thing! ๐ฆ this page came from the Debian tools source and it's UPDATE-PASSWD(8) ๐
โจ stay safe with your passwd files and don't forget your .org backups ๐ซถ๐
๐ฆ where this page comes from
- debian bookworm: base-passwd 3.6.1 ยท GPL-2.0-only
- debian trixie: base-passwd 3.6.7 ยท GPL-2.0-only
- ubuntu jammy: base-passwd 3.5.52build1 ยท GPL-2.0-only
- ubuntu noble: base-passwd 3.6.3build1 ยท GPL-2.0-only
- ubuntu questing: base-passwd 3.6.7 ยท GPL-2.0-only
- ubuntu resolute: base-passwd 3.6.8 ยท GPL-2.0-only
- ubuntu stonking: base-passwd 3.6.8 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms