Recently I did a little article on importing computers into DeployStudio lists. I got an overwhelming number of email requests to go a step further and look at importing computers into DeployStudio from the command line. I’m guessing lots of people want to bolt some middleware onto their mass deployment tools (can’t say I blame ’em). The first thing to know is that DeployStudio stores most everything in standard property lists. This includes workflows, computer groups and computers. When you install DeployStudio you selected a location to place your database. For the purpose of this example, we’re going to use /DSDatabase as our location. Within this directory is a folder…
-
-
BRU Primer -> Advanced
In BRU 2, you have 3 tools to use. These include: BRU Server Agent Config (UB) – A tool used to install the agent, which needs to be located on each machine that will be backed up (including the server if it has any data to back up) BRU Server Config (UB) – Used to configure the server daemon, backup server configurations and set passwords to communicate with the server. Also used to set licensing information and perform scans for new tape drives and libraries. BRU Server Console (UB) – Used to configure backup jobs, schedules, etc. To get started, open the BRU Server Config application from the components that…
-
Grabbing Serials and MAC Addresses
During various automations in Mac OS X it helps to grab some key unique identifiers for machines. Two very common identifiers are the serial number of a computer and the MAC Address. To grab a systems serial number I usually use ioreg to run the following, which simply outputs a systems serial number: ioreg -l | grep IOPlatformSerialNumber | cut -c 37-46 Because a system can have multiple MAC addresses (one per unique adapter), I will also use ioreg to grab those: ioreg -l | grep IOMACAddress Or to just see an output of the first in the list (en0): ioreg -l -w 0 | grep IOMACAddress | cut -c…
-
Time to Read MacTech
Haven’t had much time to read, but now that I have a couple of books completely finished I can sit back and get caught up on my reading. And it is worth mentioning that the very first reading that I’ll do is getting caught up on the articles in MacTech Magazine, which is the only magazine I actually pay for. If you don’t get it yet, you really should check it out:
-
Scripting a Battery Sanity Check
When I’m running a script that might be somewhat time intensive I like to check the battery of the MacBooks first. Otherwise I might end up hosing some machines that die out in the middle of a script. To do so I’ll use ioreg to grab the maximum load that a battery can sustain, stored in MaxCapacity: capacity=`ioreg -l | grep MaxCapacity | cut -c 35-39` Then I’ll grab the current load on the battery, stored in CurrentCapacity: current=`ioreg -l | grep CurrentCapacity | cut -c 39-43` Finally I’ll grab a percentage: echo “scale=2; $current*100/$capacity” | bc If the percentage is above a certain threshold then I’ll run the script,…
-
Scripting the Force Log Out
Scripting a log out event seems like the kind of thing that would be pretty simple, and if you use the AppleScript later it does appear simple, unless you want to force the event to occur immediately. Why would we want to do such a thing? Most commonly there are two requests. One is to invoke the script with the screen saver to meet some form of policy that requires a log out after a certain amount of time whether the user has saved their data or not (seems a big mean, but it’s not unheard of). The second is to invoke the script as part of a deployment or…
-
Scripting Fast User Switching
Fast User Switching allows a user of Mac OS X to switch accounts without logging out of the account they are currently in. There are a number of uses for this, from troubleshooting to managing workflow. The back end functionality comes from the CGSession binary located in /System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources. There are a couple of options you can use with CGSession, -switchToUserID and -suspend. /System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession -switchToUserID 1022 If an account has no password then the switch should occur automatically. If there is password then you can simply bring up a login window using the following command (you can also switch to a given user id but it will ask you for…
-
Symantec Acquires PGP & GuardianEdge
Today Symantec announced that it is acquiring PGP. I certainly hope they treat the Mac PGP client better than they’ve treated some of their other Mac clients. This move brings Symantec squarely into the encryption space. They encrypt full disks (including the boot volume of Mac OS X), portables, file servers, jump drives, Blackberry and PDFs. They have a mature centralized key management solution (after all, all encryptions seems to be key based these days) and even recently added application control to their portfolio, to block malware. Perhaps the last is why Symantec went ahead and picked them up. Or perhaps it’s because they just like buying things at Symantec.…
-
HellRaiser
A new variant of HellRaiser is now out there. It is being called OSX/HellRTS.D and in order to get infected you would have to run a server daemon, shown below. HellRaiser is a RealBasic-based trojan horse that gives control of a Mac OS X system to an attacker. This can include searching through the file system and then transferring files, viewing the clipboard, sending audio, sending chats, viewing the screen, showing pictures, viewing spotlight indexes, controlling mail and rebooting (see the tabs below). A number of products will detect the OSX/HellRTS.D. trojan horse when using the latest definition updates, including the following (which links to the HellRaiser entry for each vendor):…
-
Running SSH on 1st Revision AppleTVs
Sometimes it can be really useful to have an SSH connection into your AppleTV. If I need to explain why then you probably won’t want to do it. Unless of course, you’re just after getting something like Boxee running, which we’ll look at as well. Before we get into doing anything to your AppleTV, when we’re done I do not know how Apple will feel about your warranty moving forward, so do this stuff at your own risk (but that’s pretty much true for many articles on this site)… So first up, let’s install SSH. To get started, plug in a jump drive you don’t mind reformatting. Then run the…