Freitag, 11. April 2014

When did I change my password last time?

MacOSX is quite stable over time, you seldom need to restart to get something to work again. That compels a few colleges to never shut down the thing ever. And they are surprised every 90 days that they can't unlock the screensaver as the password has timed out yet again.

I wanted to find a local solution to look up when the password was changed last time. I came up with the following command:

dscl localonly -readpl Local/Default/Users/<user> PasswordPolicyOptions passwordTimestamp

This seemed to work fine, but I found a new user that had a fresh install of Maverics who did not have the key in their local directory... damn.

The search continues...

Montag, 18. November 2013

Chrome and high CPU load on MacOSX

I'm using an old 2008 Macbook at home as my couch-computer, and found Chrome using 100% CPU time and again.

Killing the process that produced the load (remember, chrome is multi-threaded) the gmail tab crashed. My old Mac makes a lot of noise being so strained, so I went looking.

And found this.

Basically, some bug in the changing wallpapers of gmail triggered this. I changed my wallpaper back to a basic theme (mahogany) and now the CPU idles, fan stays off, all is good in this world.

Dienstag, 12. November 2013

Remove Dashboard

Every mac user knows dashboard. 

'Isn't that the stupid nearly empty page with the weather on top that comes up when I switch workspaces the wrong way round?' 

Yes avatar of all annoying users, it is. 

'Disable it!'

No, it can not be done. 

...

Mavericks: But it can!

On the shell:
'defaults write com.apple.dashboard mcx-disabled -boolean true'

Restart & done! 

'Thank you, now make my battery last 20 hours!' 

Donnerstag, 7. November 2013

Kerberos Auth broken AGAIN (and works again)!

Long time no post, but with Mavericks, new challenges arise.

Obviously two users installed it even before I got a chance to read what had changed - Apple's gotta love the adoption rate (Mavericks being free and all). But it went fine, nothing big broke.

Our kerberos enabled Mercurial broke because the installer empties the whole python 2.7 site-packages folder (why ever! I belive this will produce lots of 'fun' for admins), but that was easily fixed and only hampered the devs (which now use git anyway).

The other fallout was the breaking of the Authentification Server Whitelist of Chrome. So none of our internal Web pages were accessible over chrome, forcing users to use the shiny new Safari. This happend before. And I fixed it before. And I fixed it again. =)

Interestingly, I just needed to reverse the changes made the last time it broke, namely reintegrating MCX setting into the main user group. It seems MCX inheritance over groups is now broken.

Huzza Apple, once again your own enterprise features are the least tested features!
Why not be consequent and kick out this token open directory once and for all? At least I would be finally forced to migrate to Active Directory and could stop wondering if this other, MS flavoured pain would be nicer than the bleak, dead landscape of mac server with its layers of broken bones of cats past, yellowed documentation printed on papyrus and fading ghosts of forgotten visions.

Dienstag, 7. Mai 2013

Turning insensitive.

I ran into a problem today: Some programs (and nearly all games) in OS X do not run of a case sensitive filesystem.

Coming from Linux to Mac, this is incomprehensible to me. Thats why I formated all my stuff case sensitive. Keeping my moral high ground and not use Steam was sadly out of the question, so I needed a solution.

Introducing iPartition!

With this tool it took me 10 minutes to do the change. It can't change the type on the disk with the system folder, thats why I needed an USB to SATA Adapter to connect my disk to another Mac. But then it worked flawlessly.

Awesome! =D

Sonntag, 17. März 2013

Githubs Boxen


Github released their install system for MacOS 'Boxen'.
Its really awesome and I will try and brng it into our stack at Lusini.

http://boxen.github.com/

Mittwoch, 28. November 2012

Spotlight failing on 10.8.2 (and how to repair that)

After updating my MBP15 to 10.8.2 it started constantly running on 100% CPU. Who needs QA anyway, right Apple?

A quick look into top revealed constantly respawing 'mdworker' threads, process number where already close to 100k.
Console revealed that fact even more, with 50+ messages streaming by every second. 'mdworker' was crashing and immediately respawned by launchd. The crash reports cycled so fast, I needed to do a screen shot to read it:


Ok, the first thing I did is stop spotlight from indexing, and resetting the index:

In the terminal:
sudo mdutil -a -i off
sudo mdutil -E

I put the whole HDD in the privacy tab in the spotlight prefs for good measure. After rebooting the log storm was gone, but Spotlight obviously as well.
I didn't really know I had so much stuff in my application folder, being used to Spotlight. I found myself screaming in frustration, navigating  hierarchically (wow, google spell checking rocks, I entered 'hirachicly' ^^;) though all this crap.

Anyway, I googled around, tried a few fixes and finally found a solution here. In post #60 phobox explains that the errors stemms from the ML sandbox (or failbox as it will come to be known) blocking mdworker from indexing.

The solution:

Append the following to /System/Library/Sandbox/Profiles/system.sb

;;; Spotlight fixes  (allow mach-lookup (global-name "com.apple.ls.boxd"))  (allow mach-lookup (local-name "com.apple.ls.boxd"))

Watch what your doing, by deleting, overwriting or generally messing in this file you can lock yourself out of the OS. 

In true try-all-fixes-at-once-so-that-you-do-not-know-what-helped thoughtlessness, I cleaned my caching folder as well 

sudo rm -r /System/Library/Caches/*


And then did a safeboot to clean up permissions (hold shift key at startup, you will see a progress bar).

Huzza, my spotlight works again! I can again close the lid at the mess in the folders, and just start the app I want to start. ^___^