When you write ...fails only when the script is run in background I wonder if you mean "when run from cron." If so, you should be aware that most cron implementations start processes in a limited environment. My first guess would be that kerberos is missing information that it normally fetches from an environment variable and this is causing it to fail. Perhaps the cache is in a non-standard location? In any event, as previous poster suggested, the output of the error method would be useful in determining the cause of your failure.
| [reply] |
Thanks for the reply. This is one of those DOH! things. I completely forgot about error(). Fixing that I found that the problem is really with the credentials cache.
$cc=Authen::Krb5::cc_default();
$cc->initialize($clientp);
The initialize call fails with this error:
Credentials cache I/O operation failed XXX
Not very helpful to me but hopefully you can understand it. To me the puzzle is why does an attached console make any difference? | [reply] [d/l] |
| [reply] |
Thanks for the reply but its none of the above. There is plenty of space in that file system. However, lets not lose sight of the original problem. This only fails when it is run without a console (cron or at). Since the script runs in root's crontab I don't see how permissions can be a problem, particularly in /tmp.
| [reply] |
What does Authen::Krb5::error() return? | [reply] [d/l] |