LPIC-1 Administrative Tasks Practice Question
In the /etc/shadow file, a user's password hash begins with '$6$'. What hash algorithm does this prefix indicate?
⚠ Common exam trap
It's easy for candidates to confuse the prefix '$6$' with SHA-256 (which uses '$5$') or mistakenly associate '$6$' with Blowfish due to similar numbering, but the correct mapping is $1$=MD5, $5$=SHA-256, $6$=SHA-512.
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
✓
SHA-512
The prefix '$6$' in the /etc/shadow file indicates that the password hash was generated using the SHA-512 (Secure Hash Algorithm 512-bit) algorithm. This is defined in the crypt(3) function's modular crypt format, where $1$ is MD5, $5$ is SHA-256, and $6$ is SHA-512. SHA-512 is the strongest of the commonly used hash algorithms in Linux password hashing, providing a 512-bit digest.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
SHA-512
Why this is correct
The `$6$` prefix in `/etc/shadow` specifies SHA-512, as defined by the crypt(3) scheme identifiers. This satisfies the stem's requirement to identify the algorithm from the hash prefix, distinguishing it from `$1$` (MD5), `$5$` (SHA-256) and `$2$` (bcrypt).
- ✗
SHA-256
Why it's wrong here
The '$6$' prefix denotes SHA-512, not SHA-256, which uses '$5$'. SHA-256 is tempting because both are SHA-2 family hashes used by crypt(3) in /etc/shadow, and SHA-256 would be the correct identification if the hash began with '$5$' instead.
- ✗
MD5
Why it's wrong here
MD5 hashes are denoted by the `$1$` prefix in /etc/shadow, not `$6$`. MD5 is tempting because it was Linux's long-standing default crypt scheme, and would be the right answer had the hash begun with `$1$`; however, `$6$` specifically signals SHA-512.
- ✗
Blowfish
Why it's wrong here
The `$6$` identifier denotes SHA-512, not Blowfish, which uses `$2a$`, `$2b$` or `$2y$`. Blowfish is tempting because it is a genuine crypt(3) hashing method, and would be the right answer had the prefix been `$2b$` — but the shadow entry's literal prefix fixes the algorithm as SHA-512.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.