Courseiva
Troubleshooting →mediumMultiple Choice

XK0-006 Troubleshooting Practice Question

A Linux administrator is investigating why a user cannot log in via SSH. The SSH service is running, and the network is reachable. The administrator suspects that the user's account is locked or expired. Which command should they use to check the account status and expiration details for the user 'jdoe'?

⚠ Common exam trap

Candidates often confuse password status (passwd -S) with full account aging information (chage -l), or mistakenly using a modification command like usermod -L instead of a query.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

chage -l jdoe

The chage -l command displays detailed account aging information, including expiration dates for the password and the account itself. In this scenario, it would reveal if the account is expired or if the password has expired, which are common reasons for SSH login failure despite the service running. This makes it the correct diagnostic tool.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    passwd -S jdoe

    Why it's wrong here

    passwd -S shows the status of the password for the user, such as whether it is locked or set. It provides limited information about password expiration but does not show account expiration date. While useful for checking if the password is locked, it does not give the full account aging details that chage -l provides.

  • ✓

    chage -l jdoe

    Why this is correct

    chage -l lists account aging information, including password expiration, account expiration, and last password change. It directly shows if the account has expired or is locked due to password aging. This is the correct tool to verify if the user's account is expired or locked, which would prevent SSH login even if the service is running.

  • ✗

    usermod -L jdoe

    Why it's wrong here

    usermod -L locks the user's password, but it does not check status. Running this would modify the account, potentially worsening the issue. It is not an investigative command. The administrator needs to check status, not change it. This command is inappropriate for troubleshooting.

  • ✗

    id jdoe

    Why it's wrong here

    id displays user and group IDs, and group memberships. It does not show account expiration or password status. While it confirms the user exists, it does not provide information about why login might fail due to account expiration or locking. This command is not sufficient for the scenario.

About these practice questions

One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.