Now that we’ve covered using dscl to create a group, let’s look at using dseditgroup to do the same thing. In the previous example we created a group called Local Admins or ladmins for short. First let’s read that group’s information. To do so, run dseditgroup followed by the operation, which can be read, create, delete, edit or checkmember as the operations (verbs). The -o is optional, so : dseditgroup -o read ladmins Or the following has the same output: dseditgroup read ladmins In the case of a namespace collision between two ladmins in two directory services then the one listed highest in the Search Policy would be displayed. The…
-
-
Kickstarting ARD
The Command Line Fibre Channel Management and Setting up the Network Stack from the Command Line articles I did on Xsanity covered a couple of tasks that you more than likely perform on every client system you setup. Now let’s look at another. Whether you are deploying Xsan or managing it, assuming you have more than 1 machine to manage (and why would you use Xsan if you don’t) then a little Apple Remote Desktop (ARD) can make your life a lot easier. You might be deploying a package to install the Final Cut Server.app or you might be installing Xsan remotely. Or maybe you’re quitting Final Cut Pro…
-
Rockabye Baby
-
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…
-
iostat with a Graphical Curriculum…
-
The iTunes Alarm Clock
I know, weak post Charles… Whatever, I think it’s cool so get over yourself – there’s still a little command line fu so it’s ok (right?)… Now on to: How to use iTunes as an alarm clock. I have at times been stuck in hotel rooms and chosen to use iTunes as my alarm clock. Yes, my phones (why does everyone in IT have more than one smartphone these days) can easily act as alarm clocks. For that matter, so can my travel alarm clock, the one they put in the room and the wake-up call. But some of us aren’t morning people and need our fault tolerance. Also, some…
-
Automating NTP Setup on Mac OS X
The two primary aspects of time setup are typically setting the time zone and setting the Network Time Protocol (NTP) server. The systemsetup command can be used to set both of these date and time options for Mac OS X computers. To see a listing of the available time zones in Mac OS X use the systemsetup with the -listtimezones option as follows: systemsetup -listtimezones Once you have the time zones you can then use systemsetup with the -settimezone option to configure the time zone on your system. It is often easiest to simply paste the time zone into the command. So to set the time zone to Detroit for…
-
Mac: Setting Screen Saver from the CLI
Earlier today I posted on how to activate the screen saver from the command line. But I hadn’t yet mentioned how to set it up. Before I do, let’s look at the /System/Library/Screen Savers directory. Here you should see a number of bundles, such as RSS Visualizer.qtz, Paper Shadow.slideSaver, Flurry.saver, Arabesque.qtz and any third party screen savers you may have installed. These are the paths to your screen savers. In order to set which screen saver you would like to use from the command line, you’re going to use the defaults command along with the com.apple.screensaver domain. First let’s read the settings there: defaults -currentHost read com.apple.screensaver Which will provide…
-
Initiating Mac OS X Screensaver from CLI
The ScreenSaverEngine.app that is located in the /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ directory can be used to invoke the screen saver on Mac OS X. So to do so from the command line you would just use the following: open /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app
-
Mail Attachments from the Command Line
Concurrent with my last post on using mail from the command line there was a thread on the Mac OS X Server email list on using attachments with mail, so I thought I would supplement what they were doing there here (so if you were following that thread the only new thing here are the -c and -b options). Let’s say you have a file on your desktop called orgchart.doc and you wanted to attach it to an email and send it to a few email addresses: contact@org.com, contact2@org.com and krypted@mac.com. We’re also going to bcc secret@org.com. You would use the following command: uuencode ~/Desktop/orgchart.doc orgchart.doc | mail -s “orgchart”…