• Mac OS X Server

    Kerberos Keys

    Kerberos uses keys to transmit information between hosts.  There are  session keys and service keys kept in the keytab file on the KDC.  The KDC (Key Distribution Center) then does out keys as needed.  To see the service keys: klist -k /etc/krb5.keytab

  • Mac OS X,  Mac OS X Server,  Unix

    Creating Directories Using -p with mkdir

    I was helping someone out the other day and was VNC’d into their server watching them work.  I asked them to make a directory about 5 levels deep into the file system.  They proceeded to make each directory one by one using mkdir.  When they were done, I actually removed them all so I could spend a second to show them how to do so much quicker…  Let’s say the directory you need created is /tmp/usr/tmp.  Rather than using 3 mkdir commands and cd’ing in between it would actually behoove one to go about using the -p option with the mkdir command.  To make this directory structure you could actually…

  • Mac OS X,  Mac OS X Server,  Ubuntu,  Unix

    Mac OS X: tail

    I was on the phone with someone earlier today and they didn’t realize that they could dynamically watch new lines come into log files in Mac OS X.  In order to do this you can use the tail command with the -f switch.  So if you want to watch your system.log file and run some processes you think will cause errors you can use the following command: tail -f system.log When you’re done watching the log file use the Control-C keystroke to stop.

  • Mac OS X,  Unix

    Writing Shell Scripts

    There’s usually a few different steps in the learning process for writing shell scripts.  The first is to figure out how to just do simple things, like write hello world to the screen.  The second is to start using a series of commands.  The third seems to be using variables.  The fourth is to start using libraries to reuse your scripts.  The next is to take variables to the next level, variabalizing everything.  Where are you at with this?

  • Mac OS X,  Mac OS X Server,  Ubuntu,  Unix

    Pipes

    A pipe’s command redirection used in Mac OS X and other *nix operating systems to send the output of a program to another for further processing (known as redirection).  Redirection means transferring of a program to another destination, such as another program, file, or the monitor.  Standard output is sometimes abbreviated stdout.

  • Mac OS X,  Mac OS X Server,  Mac Security,  Ubuntu,  Unix

    ps

    Limit process listing to those belonging to a given user by piping the output through grep. For example, processes belonging to a user with a username charles can be displayed with the following: ps -ef | grep charles The -l option generates a long listing, and when used together with the -e and -f options creates a table with 15 columns, which can also be piped for the user name: ps -efl | grep charles

  • Mac OS X

    Mac OS X: Disk Inventory X

    For those that would like to see a graphical inventory of the files on your system there is Disk Inventory X.  Cool little app, although you could do something similar using the command line.  But this is a nice little GUI app that shows disk usage statistics in a tree map.   http://www.derlien.com/