View Full Version : Please help: failed to open PAM security session
Hi to all
i got problem with making admin's backup by cron from Admin Level:
May 11 20:30:01 host crond[7222]: Authentication service cannot retrieve authentication info
May 11 20:30:01 host crond[7222]: CRON (diradmin) ERROR: failed to open PAM security session: Success
May 11 20:30:01 host crond[7222]: CRON (diradmin) ERROR: cannot set security context
i've check all permission and googled but not found any solution how to fix this issue.
If i make backups by click "Now" all working fine, but from cron not.
Can somebody help me with this ?
Thanks.
DirectAdmin Support
05-14-2008, 12:46 AM
Hello,
I've never seen that error before, so I couldn't really tell you what's up...
However there are a few things you can try to straighten out cron for the dataskq commands in this guide:
http://help.directadmin.com/item.php?id=107
The backups created by DA are stored in the cronjobs for user "diradmin", which can be viewed with:
crontab -u diradmin -lso make sure that's all there... past that, check /var/log/cron and /var/log/messages.
John
Hi John,
Thanks for reply.
I have checked all things from http://help.directadmin.com/item.php?id=107
all is fine.
crontab for diradmin user:
# crontab -u diradmin -l
30 20 * * * echo -e "action=backup&id=1&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
/var/log/messages doesnt have any error related to cron or D.A.
/var/log/cron log:
May 11 20:29:01 host crond[8759]: (root) CMD (/usr/local/directadmin/dataskq)
May 11 20:29:01 host crond[8760]: (root) CMD (/usr/local/ddos/ddos.sh >/dev/null 2>&1)
May 11 20:29:01 host crond[8761]: (root) CMD (/usr/local/sbin/bfd -q)
May 11 20:30:01 host crond[9137]: (root) CMD (/usr/local/directadmin/dataskq)
May 11 20:30:01 host crond[9136]: Authentication service cannot retrieve authentication info
May 11 20:30:01 host crond[9136]: CRON (diradmin) ERROR: failed to open PAM security session: Success
May 11 20:30:01 host crond[9136]: CRON (diradmin) ERROR: cannot set security context
May 11 20:30:01 host crond[9145]: (root) CMD (/usr/local/ddos/ddos.sh >/dev/null 2>&1)
May 11 20:30:01 host crond[9147]: (root) CMD (/usr/local/sbin/bfd -q)
May 11 20:31:01 host crond[9616]: (root) CMD (/usr/local/directadmin/dataskq)
But if i run from console
echo -e "action=backup&id=1&owner=admin" >> /usr/local/directadmin/data/task.queue.da; /bin/chmod 600 /usr/local/directadmin/data/task.queue.da
no errors and backups created.
PS. cron seems to work good, because i didn't get any emails from my customer about cron jobs
i'm use CentOS 5.1 and DA 1.31.4
Update.
Problem fixed.
user diradmin was not present in file /etc/shadow.
After adding diradmin in /etc/shadow all work without error.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.