Tag Archives: os x

Mac OS X Server Mac Security Mass Deployment

More Command Line Service Control In OS X

The serverctl command can be used to start and stop services in OS X Server. Use serverctl with a list verb to show a list of services:

serverctl list

Grab a service (without the quotes) and feed it back into serverctl with the enable option and a service= option to identify the service:

serverctl enable service=com.apple.servermgrd.xcode

Or disable, using the disable verb:

serverctl disable service=com.apple.servermgrd.xcode

Mac OS X Mac OS X Server Mac Security

A Comprehensive List of OS X 10.x Error Codes

I just put a new page up based on a  parsing thing I was working on the other night. Basically, it lists the error codes in OS X 10.x by type. Enjoy: http://krypted.com/guides/comprehensive-list-of-mac-os-x-error-codes/

iPhone Mac OS X Mac OS X Server Mac Security Mass Deployment

Use Verbose Logging With Profile Manager

Verbose logging can help you isolate a number of problems with Profile Manager. Turn on verbose logging by writing a debugOutput key with a value of 3 into /Library/Preferences/com.apple.ProfileManager.plist using the defaults command:

defaults write /Library/Preferences/com.apple.ProfileManager debugOutput 3

Once set, restart the daemon using killall:

killall -u _devicemgr

To disable, just write the key with a blank value:

defaults delete /Library/Preferences/com.apple.ProfileManager debugOutput

Then restart the daemon again:

killall -u _devicemgr

Mac OS X Mac OS X Server Mac Security

X World: See You At The Sydney Mac Conference

I’ll be doing a couple of presentations in Sydney on July 9th and 10th at X World. Judging from the sessions in past years, it looks to be a great time that’s sure to make you smarter!

Screen Shot 2015-03-16 at 10.56.06 AM

If you’re able, check it out at http://auc.edu.au/xworld/about/.

Mac OS X Mac OS X Server Mac Security Mass Deployment Ubuntu Unix WordPress

Install Pow for Rails Testing On OS X

Pow is a Rack server for OS X. It’s quick and easy to use and lets you skip that whole update an Apache file, then edit /etc/hosts, ethane move a file, then run an app type of process. To get started with Pow, curl it down and pipe it to a shell, then provide the password when prompted to do so:

odr:~ charlesedge$ curl get.pow.cx | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9039 100 9039 0 0 10995 0 --:--:-- --:--:-- --:--:-- 10996
*** Installing Pow 0.5.0...
*** Installing local configuration files...
/Users/charlesedge/Library/LaunchAgents/cx.pow.powd.plist
*** Installing system configuration files as root...
Password:
/Library/LaunchDaemons/cx.pow.firewall.plist
/etc/resolver/dev
*** Starting the Pow server...
*** Performing self-test...
*** Installed

For troubleshooting instructions, please see the Pow wiki:
https://github.com/basecamp/pow/wiki/Troubleshooting

To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`

To install an app into Pow, create a symlink to it using ln (assuming ~/.pow is your current working directory):

ln -s /path/to/myapp

Then just open the url, assuming my app is kryptedapp.com:

open http://kryptedapp.com

Pow can also use ~/Library/LaunchAgents/cx.pow.powd.plist to port proxy. This allows you to redirect different apps to different ports. When pow boots, it runs .powconfig, so there’s a lot you can do there, like export, etc. Once you’re done testing out pow, if you don’t decide it’s awesome, remove it with the following command:

curl get.pow.cx/uninstall.sh | sh

Articles and Books Bushel Consulting Mac OS X Mac OS X Server Mac Security Mass Deployment personal

Childproof Your Mac

When I put a computer in my daughters room, I soon realized I could no longer watch over her shoulder as she worked away at school games, Minecraft and of course Civilization (after all, that was my first game). So much as I wrote an article a long time ago about child-proofing an iPad, now I’m writing about child-proofing a Mac.

For me, I find that child-proofing is a bit like taking my kid to McDonald’s. I said never ever ever ever would I do this and then… Well, peer pressure, ya’ll… So if I have to do it, I figure someone else might. So here’s a quick and dirty guide to doing so. The gist of this guide is to continue using the same admin account that was created when you setup the computer initially. But to also create another account for the child, one that has some restrictions to keep them in a customized user experience. This might be to keep them out of things they try to do on purpose, keep them from accidentally finding some things they shouldn’t or maybe just to customize the user experience to make the computer easier to use (after all, if they can’t remove Minecraft from the Dock, they can’t come crying when they can’t find it.

Create a Managed Account

Most of the work that needs to be done, can be done within the System Preferences. This is available under the Apple menu as System Preferences…

Screen Shot 2014-12-26 at 5.09.00 PM

Once open, click on the Users & Groups System Preference.

Screen Shot 2014-12-26 at 5.09.41 PM

At the Users & Groups System Preference pane, click on the plus sign (+).

Childproof_Managed_Account

 

At the new account screen, choose “Managed with Parental Controls” in the New Account field. Then provide the child’s name in the Full Name field and an Account Name will be automatically created (note that I shortened the name in this example to make it easier for the child to log in).

Assuming your child doesn’t have their own iCloud account, set the password to “Use separate password” and then type it in. Once you’re happy with these settings, create the new account, which can be managed with Parental Controls by clicking on the Create User button.

Childproof_User

Restrict Applications and The Dock

Once the account is created, click on the “Enable parental controls” checkbox and then on the Open Parental Controls… button.

Screen Shot 2014-12-26 at 5.01.32 PM

At the Parental Controls System Preference pane, you’ll have a few options.

  • Check the Use Simple Finder box if you’d like the user to have a limited user experience (no command keys, only certain windows open, etc). I would usually only recommend doing this if you have very small children (like maybe pre-school age). I usually like them to be able to do as much as possible to foster the whole hacker mentality nice and young!
  • Check the box for Limit Applications if you’d only like certain apps to open. This is right up front on the main screen because it’s kinda’ important. Use the Allowed Apps section to select which apps can and can’t be opened (if there’s a checkbox beside the app name it can be opened by the user).
  • Use the Allow App Store Apps drop-down list to to set an age ranking minimum. These are available in 4+, 9+, 12+, 17+ and All (which basically disables restrictions).
  • Check the box for “Prevent the Dock from being modified” if you would like to restrict the new account from being able to edit the Dock. I usually wait for this, as I like to customize the Dock by putting the apps I want the child to open into the Dock. To do so, skip now, log in as the new user, log out and then customize the Dock. Once you’re done, log out, log in as an administrative user and then check the box.

Web Restrictions

Next, click on the Web tab. Here, you’ll effectively have 3 options: don’t restrict any content, let Apple try and block inappropriate content and build a whitelist of allowed content (with all other content blocked). Now, it’s worth mentioning that there can be an annoying element here, which is that if a site needs to be opened up for access, a child might come bugging you. But I like that, so I’m configuring this.

Screen Shot 2014-12-26 at 5.01.40 PM

Options include:

  • Allow unrestricted access to websites: Don’t block any content. Allow unfettered access to all websites ever.
  • Try to limit access to adult websites automatically: Click on the Customize button to add white and blacklisted sites, or sites that were accidentally restricted or allowed that maybe shouldn’t of. Or, if you want to restrict access to a specific web-based game that has become problematic.Screen Shot 2014-12-26 at 5.46.23 PM
  • Allow access to only these websites: This option allows access to only the websites you allow access to. A word of warning here, a lot of sites pull content from other sites, which can be kinda’ annoying…

Note: It’s worth mentioning that I discovered a few websites I’d of never tried to use in the allow list, so worth checking them out to see if your child will dig on some of these sites!

Once you’re satisfied with the options you’ve configured, click on the People tab.

Configure Who Your Child Can Communicate With

At the People screen, you can configure who the person using the Managed Account can communicate with. Here, restrict access to Game Center, restrict who the account can send and receive mail with and of course, who the account can use the Messages app with.

Screen Shot 2014-12-26 at 5.02.09 PM

The above options include the following:

  • Allow joining Game Center multiplayer games: Uncheck this box to restrict the user from playing any multiplayer games that use Game Center to connect people. If the user is using a game that doesn’t integrate with Game Center then they would still be able to use that game to enter into a multi-player game.
  • Allow adding Game Center friends: Uncheck this box to keep the user with the Managed Account from adding any new friends in Game Center.
  • Limit Mail to allowed contacts: Only allow people in the Allowed Contacts section to exchange emails with the user of the account.
  • Send requests to: Define an email address that can receive a contact request and approve it. I use this so that when my daughter needs something she can let me know.
  • Limit Messages to allowed contacts: Only allow people in the Allowed Contacts section to message with the user of the account.
  • Allowed Contacts: Use the plus sign at the bottom of this section of the screen to add new contacts and the minus button to remove contacts.

Note: Apple rarely uses the word restrict. Instead, they prefer to allow things to happen by default and then let you disallow these features. Basically the same thing, but keep this in mind when you’re configuring accounts as sometimes you can accidentally click the wrong thing if you’re not accustomed to such double-negativery. 

Once you have configured who the user of this account can communicate with, click on the Time Limits tab.

Configure Time Limits

Time limits are used to restrict what times the user can use the computer as well as how long per day that the user can actually use the computer. The options available include:

  • Limit weekday use to: Define a maximum number of hours that the managed user can use the computer on a given workday between Monday through Friday. This can be anywhere from half an hour to 8 hours of time.
  • Limit weekend use to: Define a maximum number of hours that the managed user can use the computer on a given Saturday or Sunday. This can be anywhere from half an hour to 8 hours of time.
  • School nights: Define the time frames where the computer cannot be used by the Managed User on Sunday through Thursday evenings. For example, the below screen shows that on weeknights, the Emerald Edge user can’t use the computer from 8PM to 6AM.
  • Weekend: Define the time frames where the computer cannot be used by the Managed User on Friday and Saturday nights. For example, the below screen shows that on weeknights, the Emerald Edge user can’t use the computer from 8PM to 6AM.

Screen Shot 2014-12-26 at 5.02.40 PM

Time limits are the only things that matter for some who like to physically sit with a child while they use a computer, as you might just want to keep the child from waking up in the middle of the night and accidentally seeing something that scares them. But for many, time limits won’t be enough, as kids might spend hours gaming or doing homework unmonitored.

More Stuffs

Next, click the Other tab. Here, you’ve got the miscellaneous restrictions that really don’t fit anywhere else in Parental Controls. The options available include the following:

  • Disable built-in camera: Turn off the built-in camera for the user. Note that third party cameras wills till work for the user.
  • Disable Dictation: Turn off Dictation/Speakable Items for the user. Note that apps like Dragon Naturally Speaking can still be used.
  • Hide profanity in Dictionary: Use this option to disable any articles in the Dictionary app that have profanity in them.
  • Limit printer administration: Don’t allow the user to manage printers. Note that if you do this, you’ll want to install any Bonjour printers first.
  • Disable changing the password: Don’t allow the user to change the password.
  • Limit CD and DVD burning: Disable any optical media writing for the Managed Account.

Screen Shot 2014-12-26 at 5.03.09 PM

Note: I know I said earlier that Apple rarely says restrict or disable. They will get around to fixing this screen eventually… 😉

View Logs

Once you have configured parental Controls, click on that Logs button in the lower right corner of the screen. Here, you’ll see the following:

  • Show activity for: Indicate the period of time to show logs for.
  • Websites Visited: A list of the websites accessed by the user of the managed account. Note that no third party web browsers are shown unless they use Apple’s webkit (which is basically not really any).
  • Websites Blocked: A list of any websites that were blocked while attempting to access them.
  • Applications: A list of the applications used by the user of the managed account.
  • Messages: Transcripts of conversations sent and received using the Messages app. Note that any third party chatting apps aren’t logged here.
  • Clear Log: Deletes the log. Use this after you’ve checked the behavior and wish to have the next time you check only show you what’s changed.

Screen Shot 2014-12-26 at 5.02.49 PM

And that’s what you can do with Parental Controls. But there’s more, which we’ll look at shortly. When you click out of a field, the settings are changed in a System Preference, so you should be able to just close the window and have your settings persist.

Conclusion

We’ve gone through creating a new account, restricting access to what that account can do and how and when to use these options. But there’s much, much more than we can cover in this article. There are tons of other restrictions that don’t fit into these basic options, accessed either through what are known as managed preferences or via profiles, which can easily be created by tools like Apple Configurator, Profile Manager and 3rd party mobile device management tools such as Bushel.

Screen Shot 2014-12-26 at 6.13.22 PM

Ultimately, I can pretty much break out of about any managed environment you put me in. And in the age of YouTube, chances are that your child has many the same materials I’ve either presented, written or that others have written. So please don’t consider these options as much more than just a general guideline unless you’re using a Device Enrollment Program-enabled device.

Anyway, good luck, and you’re a good parent for caring.

Mac OS X Mac OS X Server Mac Security Mass Deployment

Show Volumes On The OS X Desktop

I spent a lot of time on Windows a long time ago. And one of the things I got used to was having hard drives on the desktop. And I liked it. So when Apple took them off the desktop I started running these commands on new accounts only own systems. The other day when I gave them to someone, they said I should post them. So here goes…

To show removable media (cards, etc):

defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true

To show external hard drives (USB, Thunderbolt, firewire, etc):

defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true

To show mounted servers (AFP, SMB, NFS, etc):

defaults write com.apple.finder ShowMountedServersOnDesktop -bool true

To show internal hard drives:

defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true

iPhone Mac OS X Mac OS X Server Mac Security Mass Deployment

The 12 Days Of Krypted

Merry Christmas ya’ll!

On the first day of Christmas my true love gave to me one 32 gig iPad

On the second day of Christmas my true love gave to me two bash one-liners

On the third day of Christmas my true love gave to me three Red Hat servers

On the fourth day of Christmas my true love gave to me four email blasts

On the fifth day of Christmas my true love gave to me five retweets

On the sixth day of Christmas my true love gave to me six regular expressions

On the seventh day of Christmas my true love gave to me seven lines of perl

On the eighth day of Christmas my true love gave to me eight app store apps

On the ninth day of Christmas my true love gave to me nine AWS instances

On the tenth day of Christmas my true love gave to me ten Active Directory forests

On the eleventh day of Christmas my true love gave to me 11 crappy python scripts

On the twelfth day of Christmas my true love gave to me 12 craft brews

xmas-ornament-computer-ram

Mac OS X Mac OS X Server Mac Security Mass Deployment

Disable Natural Scrolling With a Script

I guess it’s a sign of my age. But I can’t stand that whole natural scrolling thing. So I disable it as a part of my imaging process. To do so, set the com.apple.swipescrolldirection global domain to false using defaults, as follows:

defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false

To set it back:

defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true

Mac OS X Mass Deployment

Disable The Startup Sound In OS X

Sometimes you have to reboot on an airplane or with someone sleeping close by. When this happens, it helps if you’ve disabled the startup sound in OS X. To do so, run the following command to set nvram with an empty SystemAudioVolume:

sudo nvram SystemAudioVolume=” “