Home › Forums › OS X Server and Client Discussion › Questions and Answers › Kerberos Problem with ‘cron’ or ‘at’
- This topic has 8 replies, 3 voices, and was last updated 16 years, 4 months ago by
gw1500se.
-
AuthorPosts
-
November 11, 2008 at 4:43 pm #374720
gw1500se
ParticipantAfter many days of hair pulling I have run into a problem running a perl script that uses Kerberos for authentication. This started out as what I thought was a problem with the perl module Authen::Krb5. I had a script that worked fine from the command line but when run from ‘cron’ or ‘at’ (i.e. no attached console) it would fail with the error:
[quote]Credentials cache I/O operation failed XXX[/quote]
It turns out, according to the perl module author, that is error is coming from the Kerberos library not his module. He then suggested that I check the environment variable, KRB5CCNAME. Under normal implementations this is supposed to be the path for the credentials cache file. Under OS X this variable does not exist. If I set this variable, it apparently is not used.So I have 2 basic questions. Where does OS X put the credentials cache file? Where ever that place is, why can it not be written when a script runs without a console? TIA.
November 13, 2008 at 3:44 pm #374752gw1500se
ParticipantIt doesn’t matter as it fails with any user including root. Yes. Remember this is a working script when launched from the command line. In background it fails initializing the credentials cache. If I knew where it writes the cache file I might be able to figure out why it fails. The puzzle is that I thought Apple used the standard Kerberos libraries. That being the case why is KRB5CCNAME seemingly not used?
November 17, 2008 at 2:14 pm #374778gw1500se
ParticipantThanks for the reply. I figured that is where this was heading. The standard Unix location for the credentials cache file is /tmp (I guess you are implying OS X is non-standard) not /home. The standard environment variable, KRB5CCNAME, is used to change the location of the cache file and that seems to be ignored by OS X. Since OS X does not seem to use Kerberos standards, how do I fix it?
November 17, 2008 at 4:59 pm #374785gw1500se
ParticipantThanks. Perhaps it is because I’m running a perl script, but fs_usage does not generate anything (at least the silly way I tried it). This is also the first time I tried to use it so I’m sure I didn’t do it right. It seems like the script must already be running for fs_usage to work but it does not seem to have a way to launch the script. It is not clear from the man page how I get fs_usage to launch the command its supposed to monitor.
November 17, 2008 at 6:53 pm #374788gw1500se
Participant[QUOTE][u]Quote by: MacTroll[/u][p]The user the script is running as not have a real home?
No home = no cache.[/p][/QUOTE]
I missed the ‘?’ on this. Why wouldn’t the user have a home just because its running as cron? That certainly doesn’t happen with other Unix flavors. I don’t think that can be the problem after all.December 10, 2008 at 7:21 pm #374966gw1500se
ParticipantJust to close this out, it turns out that by default, the Kerberos library use some virtual location that is not available when run in background. Using KRB5CCNAME is the solution but it requires more then just a path. It also requires the type of node specifically it needs to be told to use a file. My solution was KRB5CCNAME=’FILE:/somefilepath”.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed