16 January 2011

RPM Verification

Verifying an installed package compares information about that package with information from the RPM database on your system. The --verify (or -v) switch checks the size, MD5 checksum, permissions, type, owner, and group of each file in the package. Here are a few examples:
  • Verify all files. Naturally, this may take a long time on your system. (Of course, the rpm -va command performs the same function.)
    # rpm --verify -a
  • Verify all files within a package against a downloaded RPM.
    # rpm -V -p /root/Desktop/inn-2.4.3-6.i386.rpm
  • Verify a file associated with a particular package.
    # rpm --verify --file /bin/ls

If the files or packages check out, you will see no output. Any output means that a file or package is different from the original. There's no need to panic if you see a few changes; after all, you do change configuration files. There are eight tests. If there's been a change, the output is a string of up to eight characters, each of which tells you what happened during each test. If you see a dot (.), that test passed. The following example shows /bin/vi with an incorrect group ID assignment:
# rpm --verify --file /bin/vi
......G. /bin/vi

Table: lists the failure codes and their meanings.
rpm --verify Codes:
Failure Code
Meaning
5
MD5 checksum
S
File size
L
Symbolic link
T
File modification time
D
Device
U
User
G
Group
M
Mode
biOos

No comments: