luseradd(1)

✨ luseradd β€” adding a whole new person to your system, bestie ✨

okay so this is a page from the General Commands Manual for luseradd(1) and it's literally the tool that makes a new user account appear. iconic behavior fr fr πŸ’–


🌸 NAME 🌸

luseradd β€” Add an user πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

luseradd [OPTION]... user

πŸŽ€ DESCRIPTION πŸŽ€

Adds an user with name user. that's it, that's the whole vibe. you hand it a name, it hands you a whole new account. no cap. ✨


πŸ’– OPTIONS πŸ’–

  • -c, --gecos=gecos β€” Set the GECOS field to gecos. the GECOS field is the old-school spot where you'd stash the user's real name and other info about them. it's giving ✨historical✨ ngl.
  • -d, --directory=directory β€” Set user's home directory to directory. if you don't pass this one, you get a default that's specified by the libuser configuration. no thoughts, just defaults 🫢.
  • -g, --gid=group β€” Set user's primary group to group. and group can be either a group ID of an existing group, or a group name. plot twist: if group is a group name and that group doesn't exist, it gets created. and if you don't pass --gid at all? the default group name is user. slay πŸ’…
  • -i, --interactive β€” Ask all the questions when connecting to the user database, even if default answers are already set up in the libuser configuration. it's the "yes bestie i want to be involved in every decision" mode 😭
  • -k, --skeleton=directory β€” Populate the newly created user's home directory with a copy of directory. if you skip this option, the default is a directory specified by libuser configuration, or /etc/skel if the libuser configuration doesn't specify a default. (yes, /etc/skel, the original starter pack 🎁)
  • -M, --nocreatehome β€” Don't create a home directory and a mail spool for the newly created user. just a lil guy with no home. no mail. minimalist lifestyle 🌸
  • -n, --nocreategroup β€” If a group is not specified using -g, use group name "users" instead of user. ⚠️ and note this: despite the name of the option, the group will still be created if it does not exist. the option name is lowkey lying to you, bestie, i'm just the messenger πŸ’€
  • -P, --plainpassword=password β€” Set user's password to password. 🚨 note that the password can be viewed while running luseradd using tools such as ps(1). so like… anyone with a terminal and zero chill can peek. be careful πŸ‘€
  • -p, --password=encrypted β€” Set user's password to the password represented by the hash encrypted. 🚨 and same warning: the hash can be viewed while running luseradd using tools such as ps(1). still visible, still a vibe check risk πŸ™ˆ
  • -r, --reserved β€” The user is a system user. users that are not marked as system user usually have automatically selected user IDs above a certain value (configured as LU_UIDNUMBER in libuser.conf(5)). this information is also passed to the libuser backends. and heads up β€” this option implies the -M option πŸ‘‘
  • -s, --shell=shell β€” Set user's login shell to shell. if you don't pass it, a default specified by libuser configuration is used. pick your fighter 🐚
  • -u, --uid=uid β€” Use user ID uid for the newly created user. an user ID is selected automatically if this option is not present. so like, leave it out and the system just picks for you, main character energy ✨
  • --commonname=name β€” Use common name name for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). iykyk 🧚
  • --givenname=name β€” Use given name name for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). 🧚
  • --homephone=phone β€” Use home telephone number phone for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). πŸ“ž
  • --roomnumber=room β€” Use room number room for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). πŸšͺ
  • --surname=name β€” Use surname name for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). 🧚
  • --telephonenumber=phone β€” Use telephone number phone for the newly created user. this attribute is only supported in some backends (e.g. LDAP), and its support may have further limitations (e.g. LDAP schema rules). ☎️
🫢 tiny reminder for all those --commonname / --givenname / --homephone / --roomnumber / --surname / --telephonenumber ones: they're only supported in some backends (e.g. LDAP) and even there the support may have further limitations (e.g. LDAP schema rules). no cap, don't assume every backend is gonna catch these.

🌈 EXIT STATUS 🌈

The exit status is 0 on success, nonzero on error. so like, 0 = we ate πŸ’…, nonzero = something went sideways 😭


and that's the whole page, bestie!! this one's from the libuser squad and it's dated 2009-12-09 β€” vintage but still serving βœ¨πŸ¦‹πŸ’– periodt.