Take the 2-minute tour ×

We have a Kerberos single-sign-on system in our company. This means that I can just type kinit user@DOMAIN in the terminal, and then I can access all IT resources like file servers, internal wiki, svn server etc.

The problem is, I stay logged in for only 10 hours, so I need to run kinit every morning when I wake my computer from sleep, and every time I restart the computer.

Is there a way to run this command automatically when I start the computer, and every ten hours after that?

I did some research and I assume the correct way to do this is to use a launch agent, because the command must be run as the current user (kinit needs the password from the keychain).

I tried using the following launch agent file, but it doesn't work as expected:

<plist version="1.0">

I don't know why this launch agent doesn't work, and I have no clue how to debug it. Any ideas?

share|improve this question
add comment

1 Answer

/Library/LaunchAgents/ are tied to individual users where as /Library/LaunchDaemons/ are tied to the machine as a whole. After the system is booted and the kernel is running, property list files found in /Library/LaunchDaemons/ are loaded first as these are system-level daemon.

Try to put your plist in /Library/LaunchDaemons/ and see if it works. Because goal is to run kinit at boot up, so should not matter if it is loaded at system-level.

If its not working please reply here with your findings.

share|improve this answer
add comment

Your Answer


