Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA Exam XK0-005 Topic 4 Question 54 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 54
Topic #: 4
[All XK0-005 Questions]

A developer is unable to access a Linux server via SSH. Given the following output:

SSH server configuration (/etc/ssh/sshd_config):

PermitRootLogin no

PubkeyAuthentication yes

PasswordAuthentication yes

GSSAPIAuthentication yes

X11Forwarding no

User Information (/etc/passwd):

developer:x:1000:1000:comptia:/home/developer:/bin/bash

User Shadow File (/etc/shadow):

developer:!!::0:99999:7:::

Which of the following explains why the developer is unable to log in to the server?

Show Suggested Answer Hide Answer
Suggested Answer: B

The reason the developer cannot log in is because their account is locked. This is indicated by the '!!' in the /etc/shadow file:

developer:!!::0:99999:7:::

The '!!' in the password field means the account is locked, and the user cannot authenticate using a password.

To unlock the account, the administrator must reset the password:

passwd developer

OR, if SSH key authentication is used, the administrator can remove the lock without setting a password:

usermod -U developer

Why the other options are incorrect?

A . The developer's private key has been deleted from the server. Incorrect, because the login attempt is failing before key authentication even starts.

C . The developer's public key is in the wrong location. Incorrect, because the SSH configuration (PubkeyAuthentication yes) allows key-based authentication, but the user is still unable to log in. The issue is with the account lock.

D . SSH has been disabled for user log-in. Incorrect, because PasswordAuthentication yes confirms SSH is enabled for users (except root).


CompTIA Linux+ Official Documentation

Linux User Management -- Red Hat

Contribute your Thoughts:

Portia
3 days ago
The issue is likely with the developer's account being locked out. The shadow file shows the password field is '!!', which indicates the account is locked.
upvoted 0 times
...

Save Cancel