nerdexam
CompTIA

XK0-005 · Question #719

Joe, a user, is unable to log in to the system. The Linux administrator checks the /etc/passwd file and reviews the following output: Joe:x:1002:1002::/home/Joe:/sbin/nologin Which of the following…

The correct answer is B. Change the /sbin/nologin entry to /bin/sh for Joe. The /sbin/nologin shell is used to prevent a user from logging in. To allow Joe to log in, the administrator should change his shell to /bin/sh, which is a standard login shell in Linux. This change will allow Joe to access the system normally.

System Management

Question

Joe, a user, is unable to log in to the system. The Linux administrator checks the /etc/passwd file and reviews the following output:

Joe:x:1002:1002::/home/Joe:/sbin/nologin Which of the following should the administrator do to fix this issue?

Options

  • ARemove the x entry in the /etc/passwd file for Joe
  • BChange the /sbin/nologin entry to /bin/sh for Joe
  • CIssue the usermod -l Joe command
  • DEnsure that a corresponding entry is in the /etc/shadow file for Joe

How the community answered

(29 responses)
  • A
    10% (3)
  • B
    69% (20)
  • C
    7% (2)
  • D
    14% (4)

Explanation

The /sbin/nologin shell is used to prevent a user from logging in. To allow Joe to log in, the administrator should change his shell to /bin/sh, which is a standard login shell in Linux. This change will allow Joe to access the system normally.

Topics

#User management#/etc/passwd#Login shell#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice