krypted.com

Tiny Deathstars of Foulness

I mess computers up a lot. And that means I have to reload operating systems a lot. I’ve also been having terrible issues caused by autocorrect. So… Let’s disable it. By sending the NSAutomaticSpellingCorrectionEnabled key as a false boolean into NSGlobalDomain:

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

July 27th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , , , ,

Leave a Comment

By default in OS X, when you change an extension for a file, you get a warning. This is somewhat annoying to me, as I do this pretty frequently and have never almost accidentally done so. So to disable, send a FXEnable ExtensionChangeWarning key into com.apple.finder as false:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

To then undo, simply run with a true key:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool true

July 22nd, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , , ,

One Comment

As of OS X 10.9 (and in many cases more importantly in OS X Server for 10.9 and higher), OS X now performs ARP cache validation when trying to pass traffic over a router. If you are double NAT’d/use redundant gateways then the traffic can be interpreted as network redirection and cause some pretty bad packet loss/latency. You can disable this feature by turning off net.link.ether.net.arp_unicast_lim using sysctl:

sysctl -w net.link.ether.inet.arp_unicast_lim=0

That will only disable unicast arp validation until the next reboot. If it fixes a latency problem you’re having then you can go ahead and make it permanent by adding the following line into /etc/sysctl.conf:

net.link.ether.inet.arp_unicast_lim=0

If you’re still having issues with latency, you should turn it back on. To enable it again, repeat, swapping the 0 with a 1.

July 19th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , ,

Leave a Comment

For a long time, we used the bless command to startup systems to a specific volume in OS X. Back in 2009 I started using the systemsetup command for more and more tasks. These days, I’m being guided to replace all of my bless options in scripts to systemsetup. The easy way to configure your startup volumes using systemsetup is to list the available volumes, set one as the startup volume and then check to see which one is the current volume. The first task is to list the available startup volumes, using the -liststartupdisks option:

sudo systemsetup -liststartupdisks

You can then set the disk as one that was listed by the above command:

sudo systemsetup -setstartupdisk /Volumes/HAVOKMELTDOWN

You can finally check the current startup disk as a sanity check in your script to verify the desired disk is the startup volume using -getstartupdisk

sudo systemsetup -getstartupdisk

July 15th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , ,

One Comment

You can use the UUID of a SAN MDC in Xsan to perform a lot of tasks. To locate the UUID of a SAN MDC in Xsan:

sudo serveradmin settings san:UUID

The output is just the GUID of the san client UUID. Now you know.

July 7th, 2015

Posted In: Xsan

Tags: , , , , ,

___ “is an application downloaded from the Internet. Are you sure you want to open it?” is a warning dialog that appears when you open an application that you downloaded from the Internet. When you install those software titles with automation, you can clear the attribute that causes the prompt, so you don’t get a lot of confusion from end users. TO do so, use the xattr command, using -d to delete the com.apple.quarantine attribute. Here, we’re going to do so recursively, using the -r option and finally defining the application:

sudo xattr -d -r com.apple.quarantine /Applications/iExplorer.app

July 6th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , ,

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

July 2nd, 2015

Posted In: Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , ,

In bash, you can run multiple commands in a single line of a script. You do so by separating them with a semi-colon (;). The great thing about this is that if you end up using a variable, you can pass it on to subsequent commands. Here, we’re going to string three commands together and then echo the output:

a=1;b=2;c=$a+$b;echo $c

because we told c to be $a + $b, the $a expands to 1 and the $b expands to 2, we throw them together and then echo out the contents of c$ which appears as follows:

1+2

Now, we could have this thing do math as well, by wrapping the mathematical operation in double-parenthesis, which bash treats as an arithmetic expansion:

a=1;b=2;c=(($a+$b));echo $c

The output this one is simply 3.

June 15th, 2015

Posted In: Mac OS X, Mac OS X Server, Ubuntu, Unix

Tags: , , , , , , , , ,

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/

May 16th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , ,

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

May 1st, 2015

Posted In: iPhone, Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , ,

Next Page »