New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA XK0-005 Exam - 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:

0/2000 characters
Antonio
2 months ago
SSH isn't disabled for user log-in, so D is out.
upvoted 0 times
...
Joanna
2 months ago
Wait, can you really lock an account like that? Seems harsh!
upvoted 0 times
...
Lea
2 months ago
I thought it was A at first, but that shadow file is clear.
upvoted 0 times
...
Corazon
3 months ago
The developer's account is locked out. Check the shadow file!
upvoted 0 times
...
Venita
3 months ago
Definitely B, that "!!" means the account is inactive.
upvoted 0 times
...
Annamaria
3 months ago
I don't think SSH is disabled for the user since "PasswordAuthentication yes" is set, but I'm not completely confident about that.
upvoted 0 times
...
Jeniffer
3 months ago
The public key location could be an issue, but I thought that would show a different error message. I'm leaning towards the account being locked.
upvoted 0 times
...
Layla
4 months ago
I feel like I've seen a question like this before, and it was about SSH settings. The "PermitRootLogin no" doesn't seem to apply here since the user isn't root.
upvoted 0 times
...
Joaquin
4 months ago
I remember something about the user account being locked, and I think the "!!" in the shadow file indicates that, but I'm not entirely sure.
upvoted 0 times
...
Mitzie
4 months ago
This is a tricky one, but I'm going to carefully analyze the information provided and try to come up with a solid strategy to identify the root cause. I'm confident I can figure this out.
upvoted 0 times
...
Brynn
4 months ago
Ah, I think I've got it! The developer's public key must be in the wrong location. That would explain why they can't log in, even with password authentication enabled.
upvoted 0 times
...
Isadora
4 months ago
I'm a bit confused here. The server settings look fine, and the user account is active. I wonder if there's something else going on that's preventing the developer from logging in.
upvoted 0 times
...
Lucy
5 months ago
Okay, let's see. The SSH server is set to allow password authentication, so that's not the issue. Maybe the developer's account is locked out?
upvoted 0 times
...
Dorian
5 months ago
Hmm, this one seems tricky. I'll need to carefully review the server configuration and user information to figure out what's going on.
upvoted 0 times
...
Jess
7 months ago
SSH hasn't been disabled, so it's probably not that. My money's on the account being locked out.
upvoted 0 times
Orville
7 months ago
B) The developer's account has been locked out.
upvoted 0 times
...
Shawnee
7 months ago
A) The developer's private key has been deleted from the server.
upvoted 0 times
...
...
Lorenza
8 months ago
Haha, looks like the developer needs to remember their password! Definitely not a good idea to have a locked account.
upvoted 0 times
Laurel
7 months ago
C: A) The developer's private key has been deleted from the server.
upvoted 0 times
...
Rocco
7 months ago
B: Oh no, that's not good. They should check with the system administrator to unlock their account.
upvoted 0 times
...
Skye
7 months ago
A: B) The developer's account has been locked out.
upvoted 0 times
...
...
Lisha
8 months ago
I think the developer's public key is in the wrong location. The SSH configuration allows public key authentication, so the key must not be properly set up.
upvoted 0 times
Lawrence
7 months ago
D: It's possible that the key is not properly set up for authentication.
upvoted 0 times
...
Johnna
7 months ago
C: Maybe the developer needs to check the location of their public key.
upvoted 0 times
...
Marylou
8 months ago
B: That makes sense, the SSH configuration allows public key authentication.
upvoted 0 times
...
Angella
8 months ago
A: The developer's public key is in the wrong location.
upvoted 0 times
...
...
Laurel
8 months ago
But could it also be that SSH has been disabled for user log-in?
upvoted 0 times
...
Teri
8 months ago
I agree with Benton, the shadow file shows '!!' which means the account is locked.
upvoted 0 times
...
Benton
8 months ago
I think the developer's account has been locked out.
upvoted 0 times
...
Portia
9 months 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
Marla
8 months ago
C: Looks like the developer needs to contact the system administrator to unlock the account.
upvoted 0 times
...
Dean
8 months ago
B: That makes sense, the shadow file shows the account is locked.
upvoted 0 times
...
Ressie
8 months ago
A: The developer's account has been locked out.
upvoted 0 times
...
...

Save Cancel