Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue. The administrator examines the /etc/passwd file and discovers the following entry: joe:x:505:505::/home/joe:/bin/false
Which of the following commands should the administrator execute to resolve the problem?
A. usermod -s /bin/bash joe
B. passwd -u joe
C. useradd -s /bin/bash joe
D. chage -E -1 joe
the last field in /etc/passwd is the shell for given user. joe has /bin/false set, so he can’t access anything, as it is just a binary that immediately exits, returning false.
to change this setting, the command “useradd -s” changes the default shell for user. so the option C is correct.
sorry, it’s gonna be USERMOD, not USERADD. useradd will not work, it will show up an error “user joe already exists”.
A
( B – Removes ! in /etc/shadow )