USERHELPER(8)
π USERHELPER(8) β the PAM helper bestie π
okay so real talk, this is userhelper, and it lives in section 8 of the System Manager's Manual, aka the system manager's little corner of the world. she's a helper interface to PAM, and she's lowkey the backbone of every "please enter your password" popup you've ever tapped through. β¨
πΈ NAME πΈ
userhelper β a helper interface to PAM. that's it, that's the whole vibe. she helps. she interfaces. she does PAM things. π«Ά
β¨ SYNOPSIS β¨
userhelper [ -t ] [ -w prog args ] [ -c ] [ -f full-name ] [ -o office ]
[ -p office-phone ] [ -h home-phone ] [ -s shell ] [ username ]
π DESCRIPTION π
NOTE: this program is NOT intended to be run interactively. like, at all, bestie. if you wanna change this info straight from the command line, go usepasswd(1),chfn(1), orchsh(1)instead. she said what she said. π
so. this program gives you a basic interface for changing a user's password, their gecos information, and their shell. the main glow-up difference between userhelper and her traditional equivalents? the prompts get written to standard out, which makes it super easy for a GUI wrapper to interface with her as a child process. it's giving β¨designed to be wrappedβ¨.
the output comes in this exact form:
<number> <string>
where the number is the type of prompt returned from libpam, and the string is the prompt to give the user. number first, string second, no cap. π₯
the prompt numbers are as follows:
1β Prompt with visible input.2β Prompt with invisible input.3β Suggested answer for the current prompt.4β Informational message.5β Error message.6β Count of messages sent in this block so far.7β The name of the service being used.8β Whether or not the command will be executed as the user if authentication fails.9β The name of the user being authenticated.
π OPTIONS π
-tβ Use text mode authentication instead of the numbered message types just described. only used with-w, bestie.-wβ Specify a program name to be run and arguments to be passed to it.userhelperwill look in the file/etc/security/console.apps/programnamefor the name of a user to authenticate, the path of the binary to be run, and other settings described below.userhelperwill then attempt to authenticate the user using PAM, specifyingprogramnameas the PAM service name. if authentication succeeds, the binary will be run with superuser privileges. if the configuration file specifies that PAM session management should be performed,userhelperwill also open a PAM session before starting the program, and close the session when the program terminates. if authentication fails,userhelpercan be configured to run the program with the user's privileges instead.-cβ Change the current user's password. π note that this option cannot be used with any of the other options. this is due to the limitation in the interface tolibpam. she's a one-option-at-a-time kinda girl.-fβ Specify a new Full Name.-oβ Specify a new Office.-pβ Specify a new Office Phone.-hβ Specify a new Home Phone.-sβ Specify a new shell.
π¦ WRAPPER CONFIGURATION π¦
the wrapper configuration file used with -w contains variable assignments and file inclusions. it's basically a little playlist of settings. π
a file inclusion line has the following form:
. path
(that is a dot and a space, followed by path). if path is relative, it is interpreted relative to the directory containing the current file. the file inclusion line is interpreted by inserting contents of path to the current file. nested file inclusions are possible, but recursive file inclusion results in undefined behavior. so likeβ¦ don't. π
a variable assignment line has the following form:
name=value
no additional white space is allowed. if value is surrounded by a matching pair of " or ' quotes, the quotes are removed; otherwise, the \ characters are removed, except that \\ is replaced by a single \.
the following variables are recognized:
USERβ The name of the useruserhelpershould attempt to authenticate the invoking user as. typically this isroot. the special value<user>(which is also the default) indicates thatuserhelpershould authenticate the invoking user.
the special value <none> indicates that access should be denied; when used in conjunction with UGROUPS, members of the given groups can authenticate but all others are given an Insufficient Rights message.
UGROUPSβ A comma-separated list of groups whose members will be authenticated as ifUSERwere set to the special value<user>. if the invoking user is not a member of one of these groups, the name defined inUSERwill be used as normal. for example, settingUGROUPStowheelandUSERtorootallows members ofwheel(traditionally used for administrative privileges) to authenticate with their own credentials and requires other users to provide the root password. iconic group behavior fr fr. πPROGRAMβ The name of the binary to execute if authentication succeeds. this should always be specified as an absolute path. if not specified,userhelperwill attempt to run/sbin/programnamefirst, and failing that, it will attempt to run/usr/sbin/programname.SESSIONβ Specifies whether or notuserhelpershould perform PAM session management when running the program. typically this is needed if the PAM configuration uses a module such aspam_xauth.soto forward X11 authentication tokens for use by the program. valid values areyesandno, with the default beingno.KEEP_ENV_VARSβ A comma-separated list of names of environment variables that should be kept in the environment of the wrapped program. the environment is cleared by default and only a few selected variables are kept in the environment if they do not contain any potentially dangerous substrings.RETRYβ Specifies the number of timesuserhelpershould attempt to authenticate the user if the initial attempt fails. the default value is2, which causesuserhelperto attempt to authenticate the user a total of 3 times. third time's the charm, bestie. πFALLBACKβ Specifies whether or not the specified binary should be run with the invoking user's privileges if authentication fails. this option is useful for running applications which gain additional abilities when run with superuser privileges, but which are still useful when run without them.NOXOPTIONβ The name of an option which, if passed touserhelperas an argument for the program it will run, will causeuserhelperto behave as if the-tflag had been passed to it.GUIβ Specifies whether or notuserhelpershould useconsolehelperto present graphical dialog boxes when prompting the user for information. this is the inverse of the-toption. valid values areyesandno, with the default beingyes.BANNERβ Specifies specific text whichuserhelpershould present to the user whenuserhelperprompts for information. the default is a generic message based on the PAM service name.BANNER_DOMAINβ Specifies the text domain in which translations of the banner are stored. this setting is deprecated in favor of theDOMAINsetting. π«Ά she's old, she's retired, let her rest.DOMAINβ Specifies the text domain in which translations of strings are stored. if this setting is specified, it overrides any setting forBANNER_DOMAINwhich may also be set.STARTUP_NOTIFICATION_NAMEβ Specifies the startup notification name used for startup notification.STARTUP_NOTIFICATION_DESCRIPTIONβ Specifies the startup notification name used for startup notification.STARTUP_NOTIFICATION_WORKSPACEβ Specifies the startup notification workspace used for startup notification.STARTUP_NOTIFICATION_WMCLASSβ Specifies the startup notification binary wmclass used for startup notification.STARTUP_NOTIFICATION_BINARY_NAMEβ Specifies the startup notification binary name used for startup notification.STARTUP_NOTIFICATION_ICON_NAMEβ Specifies the startup notification icon name used for startup notification.
π EXIT STATUS π
a non-zero exit status indicates an error occurred. those errors are, in order:
- The authentication passwords was incorrect.
- One or more of the GECOS fields is invalid. this occurs when there is a colon supplied in one of the fields.
- Password resetting error.
- Some system files are locked.
- User unknown.
- Insufficient rights.
- Invalid call to this program.
- The shell provided is not valid (i.e., does not exist in
/etc/shells). - Ran out of memory.
- Could not find the program.
- Executing the program failed even though it exists.
- The user canceled the operation.
- Unknown error.
π FILES π
/etc/passwdβ The gecos and shell information is stored in this file./etc/shellsβ This file is checked to see if the new shell supplied is valid./etc/security/console.apps/progβ This file contains the values which will be used for the variables whenuserhelperis used with the-wflag./etc/pam.d/progβ This file contains the PAM configuration used whenuserhelperis used with the-wflag.
π§ SEE ALSO π§
userpasswd(1), userinfo(1), consolehelper(8), chfn(1), chsh(1), passwd(5)
π AUTHOR π
- Otto Hammersmith
<otto@redhat.com> - Michael K. Johnson
<johnsonm@redhat.com>
and that's the whole page, bestie!! π this one came to you courtesy of Red Hat, Inc., dated January 8 2008 β yes she's a little vintage but she's still serving, and honestly? she ate. π β¨ go forth and authenticate responsibly. π¦
π¦ where this page comes from
- debian bookworm: usermode 1.114-3+b1 Β· GPL-2.0-or-later
- debian trixie: usermode 1.114-3+b2 Β· GPL-2.0-or-later
- ubuntu jammy: usermode 1.114-3 Β· GPL-2.0-or-later
- ubuntu noble: usermode 1.114-3build2 Β· GPL-2.0-or-later
- ubuntu questing: usermode 1.114-3build2
- ubuntu resolute: usermode 1.114-3build3 Β· GPL-2.0-or-later
- ubuntu stonking: usermode 1.114-3build3 Β· GPL-2.0-or-later
- Copyright (C) 1997, 1999, 2001, 2003, 2007, 2008 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms