lnewusers(1)

πŸ’– lnewusers β€” create new user accounts, bestie πŸ’–

okay so this is lnewusers(1), a page from the General Commands Manual, and it's literally the group-chat way to spin up a whole batch of new user accounts. No cap. Let's get into it 🫢


✨ NAME ✨

lnewusers β€” Create new user accounts πŸ’…


🌸 SYNOPSIS 🌸

lnewusers [OPTION]...

πŸ¦‹ DESCRIPTION πŸ¦‹

So the vibe is: it creates new user accounts using data that it reads from standard input. That's the whole thing. Feed it lines, get users. Iconic.

The input data is made of lines, and every single line has 7 colon-separated fields. Let's go through them one by one, no skipping, bestie:

  • User name β€” the name, obviously.
  • Plaintext password β€” yep, plaintext, we're all just living like this.
  • User ID β€” heads up: lnewusers refuses to create users with user ID 0 (that's the root user ID). It is simply not happening. Periodt.
  • Group β€” if this field is a valid group ID, it gets interpreted as a group ID. Otherwise it's interpreted as a group name. And if the field is empty, then a group name equal to the user name is used.

Also, if the specified group does not exist, it gets automatically created. And if the group is specified with a group ID, then the created group has a group name equal to the user name. Slay πŸ’…

  • GECOS β€” this field is traditionally used to store the user's real name and other information.
  • Home directory β€” if this field is empty, then a default specified by libuser configuration is used. And if libuser configuration does not specify a default, then /home/username is used.
  • Login shell β€” if this field is empty, a default specified by libuser configuration is used.
Errors in user specifications get reported, and then processing just continues on to the next line. She's resilient like that. Not me being unbothered πŸ’€

✨ OPTIONS ✨

  • -f, --file=file β€” Read account data from file instead of standard input. So you don't have to pipe it in, queen.
  • -i, --interactive β€” Ask all questions when connecting to the user database, even if default answers are already set up in libuser configuration. Yes, all of them. She wants the full conversation πŸ—£οΈ
  • -M, --nocreatehome β€” Don't create home directories. No home for them, I guess 😭
  • -n, --nocreatemail β€” Don't create mail spool files. No mail, no problem πŸ“­

🌈 EXIT STATUS 🌈

The exit status is 0 on success, and nonzero on fatal error. And listen β€” errors in user specifications are not reflected in the exit status. So don't go checking the exit code for that, iykyk πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€

Yeah, there's no SEE ALSO section in this one, bestie β€” the original page doesn't have one, so we're not making one up. We keep it honest around here fr fr πŸ’–


And that's the whole page, bestie. This lovely thing comes from libuser, and it's dated Jul 13 2008 β€” yes, she's been iconic since 2008 and she's still serving. Go make some users. Slay. Periodt. πŸ’…βœ¨