== Where to find package inventories on Solaris 9 One of the jobs of a package management system is to keep track of what files belong to what packages. Solaris 9 keeps this information in a single plaintext file, _/var/sadm/install/contents_, complete with file ownership and permission data. The format is relatively obvious; _pkgmap(4)_ describes most of the bits, and [[here http://www.cs.duke.edu/cgi-bin/man.cgi?section=4&topic=contents]] is another reference. (My Solaris 9 install does not have a _contents(4)_ manpage; I may be missing some package.) The official Solaris 9 way of poking around in this information is the _pkgchk_ command, sometimes combined with _pkginfo_. Unfortunately this is often hideously verbose, so lots of people evidently resort to _grep_ et al. Pkgchk can be used for verification in a non-verbose way, so the Solaris equivalent of my [[_check-rpmv_ script ../linux/RPMVerificationI]] is: #!/bin/sh n=/tmp/check.$$ for i in `pkginfo | awk '{print $2}'`; do pkgchk $i >$n 2>&1 if test -s $n; then echo $i: sed 's/^/ /' <$n fi done rm -f $n (Don't use this for system verification after an intrusion at all, since _sum(1)_ checksums are relatively trivially breakable plus the _contents_ file is very easy to manipulate. Sun has integrity checking tools with much better checksums.) Various other interesting things are floating around _/var/sadm_, including package descriptions and installation logs. (I will give _pkgchk_ style points for the _-x_ option; doing the equivalent in RPM is much, much more annoying.)