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--gidat 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/skelif 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 runningluseraddusing tools such asps(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 runningluseraddusing tools such asps(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 asLU_UIDNUMBERinlibuser.conf(5)). this information is also passed to the libuser backends. and heads up β this option implies the-Moption π-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/--telephonenumberones: 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.
π¦ where this page comes from
- alpine 3.24: libuser-doc 0.64-r2 Β· LGPL-2.0-or-later
- centos-stream 10: libuser 0.64-12.el10 Β· LGPL-2.0-or-later
- centos-stream 9: libuser 0.63-17.el9 Β· LGPLv2+
- centos-stream 9: libuser 0.63-17.el9 Β· LGPLv2+
- debian bookworm: libuser 1:0.64~dfsg-1 Β· LGPL-2.0-or-later
- debian trixie: libuser 1:0.64+git20241106~dfsg-3 Β· LGPL-2.0-or-later
- fedora 43: libuser 0.64-16.fc43 Β· LGPL-2.0-or-later
- fedora 43: libuser 0.64-16.fc43 Β· LGPL-2.0-or-later
- fedora 44: libuser 0.64-17.fc44 Β· LGPL-2.0-or-later
- fedora 44: libuser 0.64-17.fc44 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- opensuse-leap 16.0: libuser 0.64-bp160.1.1 Β· LGPL-2.0-or-later
- ubuntu jammy: libuser 1:0.63~dfsg-4build1 Β· LGPL-2.0-or-later
- ubuntu noble: libuser 1:0.64~dfsg-2build2 Β· LGPL-2.0-or-later
- ubuntu questing: libuser 1:0.64+git20241106~dfsg-3
- ubuntu resolute: libuser 1:0.64+git20241106~dfsg-4build1 Β· LGPL-2.0-or-later
- ubuntu stonking: libuser 1:0.64+git20241106~dfsg-4build1 Β· LGPL-2.0-or-later
- Copyright (C) 2005, 2009 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms