• Mac OS X,  Mass Deployment

    More repairPermissions

    Yesterday I looked at using diskutil to repair the permissions on a boot volume. You can also use diskutil to repair the permissions on a non-booted volume provided that there is a valid Mac OS X installation on that volume. To do so you would simply provide the path to that volume rather than to the blessed boot volume. For example, if the disk that we mentioned in the previous article were called Seldon and it was in a host booted to target disk mode then you would simply provide the path /Volumes/Seldon as before: diskutil repairPermissions /Volumes/Seldon In the event that you are scripting and want to take into…

  • Mac OS X,  Ubuntu,  Unix,  Xsan

    Uniq Logs

    Recently I’ve been looking at a lot of log files. And sorting through them can be a bit of a pain. However, there are some tools out there to help make this process a bit easier. The first of these is sort. If I have a log that has 1,000 lines, while I like to initially see any lines that are repeated numerous times so that I can see when servers are throwing a lot of errors, combing through them can get tedious. Sort will help to reduce the volume and organize them in a manner that makes sense. For example, to sort the logs and remove duplicate line entries…

  • Mac OS X,  Mass Deployment

    What Is My Build Number?

    I have been known to occasionally ask what build number of Mac OS X that someone is using. The sw_vers command can be used to obtain this. Simply run: sw_vers And the BuildVersion will be listed. Or just to get the BuildVersion: sw_vers | grep BuildVersion Or to just get the number (useful in scripts that catalog such a thing: sw_vers | grep BuildVersion | cut -c 15-21 As one comment just indicated, you could also just use `sw_vers -buildVersion`. I guess I should review these commands every operating system or 4… Thanks Allen.

  • Mac OS X,  Windows Server

    RDP from the Command Line

    Let’s face it, connecting to Windows Servers is a must for many of us. And some of us want to do so programatically. I did look at populating the CoRD database in a previous article. But now, luckily CoRD has recently introduced a command line interface for managing just these types of connections on the fly as well. And, it is very straight forward. There are two ways to call CoRD from the command line. The first is similar to how we handled VNC in an earlier article. Simply leverage the open command and call the URL with a rdp in the beginning. For example, if you want to open…

  • Mac OS X

    Box.net Client For Mac OS X

    Wrote a quick little tool for mounting Box.net accounts to the Finder of Mac OS X. This allows you to interact with the Box.net service as you would a MobileMe account or a file server. The tool connects to Box.net over WebDAV and so you will need to provide you username and password (which can be saved into your Keychain) for your Box.net account with each login. However, you can put the tool into your startup items, login items, etc. Future releases might include the ability to store your credentials so you don’t have to provide them any more or the ability to synchronize your files from your Box.net account,…

  • Xsan

    Xsan Log Generator

    XsanDebugged is a small, quick little tool that copies the Xsan logs to the desktop of the user running it. It’s designed so that an Xsan administrator can leave it in the Dock of a computer and then tell an editor or someone onsite to click on it and not have to step anyone through typing commands to copy logs, compress them and then email them. Another tool that is fairly quick and easy from the command line, but meant to save a bunch of time on the phone when troubleshooting issues remotely. Click here to Download XsanDebugged XsanDebugged can be found on the Apps page of this site.

  • Windows Server,  Windows XP

    Show Desktop Icon for Windows & Windows 7

    Ever delete the Show Desktop icon from Quick Launch? One of my favorite features of Windows, it is a big part of my everyday use of the OS. So when I accidentally deleted it I had to figure out how to get it back. And it wasn’t nearly as easy as I would have thought (in my case) as I had deleted the actual scf file. To recreate that file was a bit complicated. So I wanted to document my steps. First, create a new file called Show Desktop.scf. Then open the file in your favorite text editor and paste in these contents: [Shell] Command=2 IconFile=explorer.exe,3 [Taskbar] Command=ToggleDesktop Save the…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Programatically Setting Password Policies

    Mac OS X, like many operating systems has a robust password policy engine.  One that is not leveraged by default on either Mac OS X client or on Mac OS X Server.  In Mac OS X Server, when using Open Directory, you can easily click on Open Directory in the SERVERS sidebar list of Server Admin and then click on the Settings icon in the Server Admin toolbar.  Here, if you click on Policies you’ll see the available Policies for Open Directory accounts. However, in order to use Password Policies in non-Directory Services environments (ie – on standalone Mac OS X clients or servers) you’ll need to use the command…

  • Mac OS X,  Mac Security,  Mass Deployment

    Self Destructing Scripts

    I have mentioned creating a self destructing script or launchd item a few times in articles on this site. But it was recently pointed out that I never actually showed how to go about doing so. Until recently I would actually use an out-of-band script to remove a script, a launchd agent or a launchd daemon. However, this would invariably leave elements somewhere on a file system of the script. For example, within a script I would echo out another script, fire off that script and then use it to delete (rm) the original script. When I planned out a deployment or a series of scripts I would always have…