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 -v for 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 ๐Ÿซถ๐Ÿ’–