New User Login Exam Question

Hi Folks,

I am studying for my 1z0-821 exam and I would like to clarify an answer to the following question :

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?

  1. Usermod -f 0
  2. passwd newuser
  3. mkdir /home/newuser
  4. useradd -D

According to my research, the /etc/shadow with the UP: : : means that the user Account has not been activated by administrator. So, I guess the answer might be C Usermod -f 0 ? as this will set invalidity to none?

PS : I am new to Unix... using windows for my whole life and time for a change. :slight_smile:

I think usermod -f 0 changes the inactive *field* (not status). I.e. will change the 10 to 0.
You must change the password field by means of the password command.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.