Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

PasswordService failing on regular interval - "unable to send command to Password Server"

For anybody experiencing the issue where PasswordService will fail every few weeks, I've written a script that kickstarts it when it happens.


User logins will start failing (DIGEST-MD5) when this happens as will as caldav, cardav, jabber and others. Your opendirectoryd log will fill up with garbage that looks like this:


2012-06-11 08:04:51.021 EDT - 179.644232 - Client: c2s, UID: 84, EUID: 84, GID: 1, EGID: 1

2012-06-11 08:04:51.021 EDT - 179.644232, Node: /LDAPv3/127.0.0.1, Module: AppleODClient - unable to send command to Password Server - sendmsg() on socket fd 17 failed: Broken pipe (5205)


I was hopping for a fix from Apple, but I'd rather bandaid it at this point and be done with it. You can use this script in conjuction with the WatchPaths key in launchd. Set your WatchPaths to /private/var/log/opendirectoryd.log. Whenever the log gets updated, the script will run and check it for this error. If it sees it being logged, it kills PasswordService and opendirectoryd and exits.


#!/bin/bash   if tail -n20 /private/var/log/opendirectoryd.log | grep -q "Broken pipe"      then           killall PasswordService;           sleep 5;           killall opendirectoryd;           sleep 5;           exit; fi

Posted on Jun 11, 2012 11:24 AM

Reply
3 replies

Jun 20, 2013 2:46 AM in response to Jonathan Melville

I've had this problem for a while now but only just found this thread.
Having not done much work on OS X its been a slow process and Launchd is completely new to me. I cant seem to find much out about Watchpaths and nothing matching is in the Launchd. Should it have a .plist related?edge


Your help and knowledge would be much appreciated.

Many Thanks,


Michael

PasswordService failing on regular interval - "unable to send command to Password Server"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.