While decommissioning a temporary account, a Linux administrator runs the command:
# userdel -r qauser
The command fails and the shell's "$?" variable immediately shows an exit status of 8. According to the userdel(8) manual, what does this specific exit value signify?
The specified user is currently logged in.
The /etc/passwd file could not be updated.
The home directory could not be removed.
The command syntax supplied to userdel is invalid.
The userdel command documents a set of numeric exit values that help administrators script around or troubleshoot failures. Exit status 8 is returned when the account slated for deletion is still logged in (or has running processes). Until the user logs out-or the administrator forces removal with the -f flag-the deletion will not proceed. Other documented values include 1 for an un-writeable passwd file, 2 for bad syntax, and 12 when the home directory cannot be removed, but none of those match the situation described.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the -f flag in the userdel command?
Open an interactive chat with Bash
What does the exit status value of 8 represent in Linux commands?
Open an interactive chat with Bash
How can an administrator check if a user is logged in or has active processes?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access