home > mac > pam_and_launchd_interaction.html

Saturday, January 23rd, 2010

PAM and launchd Interaction

While experimenting with /etc/sshd_config settings on Snow Leopard (10.6), I had disabled PAM (by setting UsePAM no). This had an unintended side effect of making launchctl behave poorly for periodic tasks I run from the ~/Library/LaunchAgents folder. I turned PAM back on (set UsePAM yes) and all was happy.

launchd must use the Pluggable Authentication Module interface as part of the mechanism that allows user agents to run.

If you see something like the following error message when trying to run launchctl commands, you may also have this problem:

Bug: launchctl.c:2325 (23930):13: (dbfd = open 
(g_job_overrides_db_path, O_RDONLY | O_EXLOCK | O_CREAT,
S_IRUSR | S_IWUSR)) != -1
launch_msg(): Socket is not connected

Thanks to these threads for getting me thinking along this solution path.

/mac   〆   permalink