You have a ticket from a new user on the system, indicating that he cannot log in to his account.
The information in the ticket gives you both the username and password. The ticket also shows
that the account was set up three days ago.
As root, you switch users to this account with the following command:
su newuser
You do not get an error message.
You then run 1s -1a and see the following files:
local1.cshrc local1.login local1.profile .bash_history .bashrc .profile
As root, you grep the /etc/passwd file and the /etc/shadow file for this username, with these
results:
/etc/passwd contains newuser:x:60012:10:/home/newuser:/usr/bin/bash
/etc/shadow contains newuser:UP: : : : :10: :
As root, what is your next logical step?
A.
Usermod �f 0
B.
passwd newuser
C.
mkdir /home/newuser
D.
useradd �D
Explanation:
The content of the /etc/shadow document indicates that the newuser account has no
password.
We need to add a password.
The passwd utility is used to update user’s authentication token(s).
D: Here the user account already exist. There is no need to create it.
When invoked without the -D option, the useradd command creates a new user account using the
values specified on the command line plus the default values from the system. Depending on
command line options, the useradd command will update system files and may also create the
new user’s home directory and copy initial files.
Reference: man passwd
B – account requires a password setting
B
B