The Archives

  • 06.Sep.09
    How to verify MD5 or SHA-1 digests security | rafacas | (2)
    MD5 and SHA-1 are cryptographic hash functions. They are deterministic procedures that take an arbitrary block of data as input and return a fixed-size bit string, the hash value (called message digest or fingerprint as well). Verifying MD5 or SHA-1 digest is highly recommended when you download new software for your system. In most of Linux distros the md5sum and sha1sum commands are available: $ md5sum ubuntu-9.04-desktop-i386.iso 66fa77789c7b8ff63130e5d5a272d67b ubuntu-9.04-desktop-i386.iso $ sha1sum ubuntu-9.04-desktop-i386.iso 19aabf327fdbde9e66db54dc04e3a83b92f70280 ubuntu-9.04-desktop-i386.iso Solaris (even version 10) doesn’t ship either with md5sum or sha1sum installed. However you can use digest: % /usr/bin/digest -a md5 GNUgcc.3.4.4.SPARC.64bit.Solaris.10.pkg.tgz 498c344fe2839631bb7cf4b869b7b830 % /usr/bin/digest -a sha1 GNUgcc.3.4.4.SPARC.64bit.Solaris.10.pkg.tgz a8da8247900dd06a7000fd0e6d41f834d6ab3e40 And in Mac OS X, ...
  • 08.Feb.09
    Unlocking a user account cmd | rafacas | (0)
    # passwd -u user Unlocks user's account. That is, lets user log in (a locked account is one prevented from logging in).
  • 25.Jan.09
    Locking a user account shell | rafacas | (3)
    # passwd -l user Locks user's account, that is, prevents user from logging in. Note: This option is available in Linux and Solaris. In Mac OS X, -l option means something different: # passwd -l location user Here, -l changes the password in location. Valid values are: file: a filename. Default is /etc/master.passwd netinfo: a domain name or server/tag pair nis: an NIS domain name opendirectory: a directory node name
  • 25.Oct.08
    Recursive grep in Solaris cmd | rafacas | (1)
    $ find . | xargs grep PATTERN In Solaris, the grep command does not have the -R (-r, --recursive) option which reads all files under each directory, recursively. The above command can be used to do the same in Solaris.
  • 08.Jun.08
    Displaying virtual memory data cmd | rafacas | (0)
    $ vmstat 5 5 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 1468896 23356 354528 0 0 101 28 70 642 4 1 94 2 0 0 0 1468888 23356 354528 ...