CompTIA Linux+ (XK0-006)SecurityEasy
A system administrator needs to check the validity and integrity of installed RPM packages on a critical server. Which command should be used to verify all files belonging to a specific package, such as 'httpd', against its stored metadata and checksums?
- Arpm -q httpd
- Brpm -i httpd
- Crpm -U httpd
- Drpm -V httpd
Show answer & explanationAnswer & explanation
Correct answer: D. rpm -V httpd
The 'rpm -V' command (or 'rpm --verify') is used to verify the integrity of files belonging to an installed RPM package. It checks file sizes, MD5 sums, permissions, types, owners, and groups against the RPM database.
Why the other options are wrong
- A. This command queries information about an RPM package, such as its version, but does not perform integrity checks.
- B. This command installs an RPM package, it does not verify an already installed one.
- C. This command upgrades an RPM package, it does not verify its integrity.
RPM Package Verification
RPM verification checks the integrity of installed package files against their original metadata, detecting modifications.
- Uses 'rpm -V' or 'rpm --verify'.
- Compares file attributes like size, checksums, permissions.
- Outputs codes indicating discrepancies (e.g., S for size, M for MD5 sum).
Memory trick: RPM: Install, Update, Query, Verify.