Re: cron script won't run

"Adam T. Bowen" <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
Hi,

Matthew Metzger wrote:
> I have a script that works great when I run it from the command line,
> but doesn't work at all when added to crontab. 

# cat /dev/sysadm/mantra
The environment from within cron is not necessarily the same as that of
an interactive shell.

> The strange part is that
> /var/log/cron shows the job running:
> 
> Sep 26 03:39:01 cono crond[25241]: (root) CMD
> (/etc/cron.3min/mail-restart.sh)
> 
> However, the log shows some other errors that may have something to do
> with it.
> 
> PAM adding faulty module: /lib/security/pam_krb5.so
> (root) CMD (/etc/cron.3min/mail-restart.sh)
> PAM unable to dlopen(/lib/security/pam_krb5.so)
> PAM [dlerror: /lib/security/pam_krb5.so: cannot open shared object file:
> No such file or directory]

Is the PAM Kerberos package installed on your system?  Does the file
/lib/security/pam_krb5.so actually exist?  Perhaps something in your
script is triggering authentication through Kerberos.  You could:

grep /etc/pam.d/* krb

to reveal any specific pam configurations that are trying to use
Kerberos.  I can't be of much more help I'm afraid.  Sticking a load of
echo statements into the mail-restart.sh script could reveal what line
in your script is causing the error.

Cheers

Adam
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.