Mac OS X,  Mac Security,  Ubuntu,  Unix

openssl and Signatures

A checksum can be used to determine if a file has been tampered with at a later date.  To run a checksum use the following command:

openssl dgst -HASHTYPE path_to_file

HASHTYPE would then be md2, md4, md5, mdc2, rmd160, sha or sha1.  Let’s go ahead and do a checksum of our smb.conf file:

openssl dgst -md5 /var/db/smb.conf

You should then see output similar to the following:

MD5(/var/db/smb.conf)= e4b58a63c6682b298aeca3ad40734c1e

MD5(/var/db/smb.conf)= e4b58a63c6682b298aeca3ad40734c1e