CompTIA Linux+ XK0-006 (V8) Practice Question

After a recent security review, you are asked to improve the integrity check that accompanies your nightly backups.

The existing script:

tar czf /backups/nightly.tar.gz /data
sha256sum /backups/nightly.tar.gz > /backups/nightly.tar.gz.sha256

and both files are copied to a read-only NFS share that is visible to everyone on the operations network. Management wants to be sure that an attacker who can read the share cannot replace the archive with malicious data yet still produce a matching checksum. SHA-256 must remain the underlying algorithm because downstream systems depend on it.

Which change to the script BEST satisfies this requirement?

  • Replace SHA-256 with a faster unsalted MD5 checksum to simplify manual verification.

  • Truncate the SHA-256 digest to 128 bits before saving it to make brute-force collisions more difficult.

  • Keep SHA-256 but encode the digest in Base64 rather than hexadecimal before saving it.

  • Use a command that generates an HMAC-SHA-256 value with a secret key known only to the backup and verification processes, and store that value instead of the plain checksum.

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot