VIPW(8)
๐ VIPW(8) โ vipw, vigr ๐
ok so real talk, bestie: this is the vipw(8) page from the shadow-utils girlies, and it's also bringing vigr along for the ride. two icons, one manpage, both absolutely essential if you're messing with account files. let's get into it ๐
โจ NAME โจ
so these two commands are vipw and vigr โ and what they do is edit the password, group, shadow-password or shadow-group file. that's literally the whole job, no cap ๐
โจ SYNOPSIS โจ
okay the vibe check on syntax is super simple, look:
vipw [options]
vigr [options]
like yes, that's it, that's the whole opening move ๐ฆ
โจ DESCRIPTION โจ
so here's the tea โ โ the vipw and vigr commands edit the files /etc/passwd and /etc/group, respectively. respectively!! meaning vipw takes the passwd file and vigr takes the group file, they're not out here swapping, iykyk.
but wait, there's more ๐ โ if you hit them with the -s flag, they will edit the shadow versions of those files instead: /etc/shadow and /etc/gshadow, respectively. so -s is giving "take me to the secret file" energy and honestly? obsessed.
and bestie, this is the important part: the programs will set the appropriate locks to prevent file corruption. that's the whole reason you use these instead of just yeeting open /etc/passwd in vim like a menace. do NOT come for me in the replies if you skip the locks ๐
when the programs go looking for an editor, they're not picky โ they check in this exact order:
- first they try the environment variable
$VISUAL - then they try the environment variable
$EDITOR - and finally, the default editor,
vi(1)
so if your editor situation is chaotic, now you know exactly who to blame ๐ธ
โจ OPTIONS โจ
the options which apply to the vipw and vigr commands are โ yes, both of them, this list is shared, we love a crossover episode ๐ซถ
-g,--groupโ edit the group database. group chat for your groups, basically.-h,--helpโ display the help message and exit. the "just tell me what to do" option, iconic.-p,--passwdโ edit the passwd database. user accounts, coming right up.-q,--quietโ quiet mode. shhh ๐คซ no yapping.-R,--rootCHROOT_DIR โ apply changes in theCHROOT_DIRdirectory and use the configuration files from theCHROOT_DIRdirectory. โ ๏ธ heads up though: only absolute paths are supported. do not come at this with a relative path, it will not go well for you, fr fr.-s,--shadowโ edit the shadow or gshadow database. the secret menu โจ
โจ ENVIRONMENT โจ
these two env vars are the ones calling the shots on which editor shows up:
VISUALโ the editor to be used. main character of the editor-hunting process, gets first dibs ๐EDITORโ the editor to be used ifVISUALis not set. so it's the backup dancer, but a very important backup dancer ๐
โจ FILES โจ
the files these bad boys are touching, in all their glory:
/etc/groupโ group account information./etc/gshadowโ secure group account information. ๐/etc/passwdโ user account information./etc/shadowโ secure user account information. ๐
like, look at them. four little files running the entire account system. slay ๐
โจ SEE ALSO โจ
go read these next, bestie, they're all connected:
vi(1), group(5), gshadow(5), passwd(5), shadow(5)
(and yes, that's exactly how the original lists them โ I'm not about to "fix" the punctuation, that's not my business ๐)
โ ๏ธ tiny reminder before you go: these commands exist specifically to set locks so your files don't get corrupted. don't skip them, don't get cute with relative paths on-R, and maybe set$VISUALto something you actually know how to exit. ๐
and that's the whole page!! this one came to you courtesy of shadow-utils 4.18.0, dated 06/24/2025 โ she's serving version numbers and timestamps at the very end like the legend she is ๐โญ๐
๐ฆ where this page comes from
- alpine 3.24: shadow-doc 4.18.0-r1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms