Table of contents
- 自動排程程式cron
- cron.d的執行
- cron.d與libc更新
- crontab的設定
自動排程程式cron
cron.d的執行
cron.d與libc更新
- cron.d與libc及gcc版本有關,如果更新相關程式庫,需reboot以符合版本,否則出現下面錯誤。
...
Nov 8 08:35:01 DEVP CROND[53784]: (kuang) CMD (if ! [ -e /home/kuang/mac/do_not_delete ];then /usr/bin/fusermount -u /home/kuang/mac;/usr/bin/sshfs kuang@IMacKuang:/Users ~/mac -o password_stdin < ~/bin/PW;fi)
Nov 8 08:35:01 DEVP CROND[53785]: (kuang) CMD (if ! [ -e /nas3/do_not_delete ];then /usr/bin/fusermount -u /nas3;/usr/bin/sshfs kuang@dev2:/u01 /nas3 -o password_stdin < ~/bin/PW2;fi)
Nov 8 08:36:01 DEVP crond[55611]: (kuang) PAM ERROR (Module is unknown)
Nov 8 08:36:01 DEVP crond[55611]: (kuang) FAILED to authorize user with PAM (Module is unknown)
Nov 8 08:36:01 DEVP crond[55610]: (kuang) PAM ERROR (Module is unknown)
Nov 8 08:36:01 DEVP crond[55610]: (kuang) FAILED to authorize user with PAM (Module is unknown)
Nov 8 08:37:01 DEVP crond[55625]: (kuang) PAM ERROR (Module is unknown)
...
- 11/8/8:35 原還可執行crontab的內容,8:36旋即發生錯誤
- 網友建議:
root@sasha-lab ~]# vim /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called, auth modules not needed
account required pam_access.so
account include password-auth
#session required pam_loginuid.so
session sufficient pam_loginuid.so
session include password-auth
auth include password-auth
說明:session required pam_loginuid.so 修改爲:session sufficient pam_loginuid.so
crontab的設定