With rpm -qV openssh-server I will get a list of files that have changed compared to default.

~$ rpm -qV openssh-server
S.?....T.  c /etc/ssh/sshd_config
~$ 

Can dpkg on Ubuntu do the same?

link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

I don't thinks so, in Ubuntu md5 checksums are only stored for certain files. For any given package the list of files that have checksums can be found in

/var/lib/dpkg/info/<package>.md5sums

e.g

/var/lib/dpkg/info/openssh-server.md5sums

These generally don't contain a complete list of the files that have been installed by a package e.g. openssh-server.md5sums

bb5096cf79a43b479a179c770eae86d8  usr/lib/openssh/sftp-server
42da5b1c2de18ec8ef4f20079a601f28  usr/sbin/sshd
8c5592e0d522fa0f8f55f3c104479ef5  usr/share/lintian/overrides/openssh-server
cfcb67f58bcd1edcaa5a770863e49304  usr/share/man/man5/sshd_config.5.gz
71a51cbb514da3044b277e05a3ceaf0b  usr/share/man/man8/sshd.8.gz
222d4da61fcb3c65b4e6e83944752f20  usr/share/man/man8/sftp-server.8.gz

You can use the debsums command (sudo apt-get install debsums) to check the files that have md5 signatures

debsums openssh-server
/usr/lib/openssh/sftp-server                                                  OK
/usr/sbin/sshd                                                                OK
/usr/share/lintian/overrides/openssh-server                                   OK
/usr/share/man/man5/sshd_config.5.gz                                          OK
/usr/share/man/man8/sshd.8.gz                                                 OK
/usr/share/man/man8/sftp-server.8.gz                                          OK
link|improve this answer
The md5sums omit config files ( ones in /etc ) because you are expected to change those. – psusi Oct 18 '11 at 16:06
Yes, the file /etc/ssh/sshd_config for example is generated by a script. Under CentOS though the default config files do have md5sums. – Iain Oct 18 '11 at 16:49
feedback

There is tool debsums you can check out.

# apt-cache search debsums
debsums - tool for verification of installed package files against MD5 checksums
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.