错误代码0xc0000001_access denied for user root@ip

错误代码0xc0000001_access denied for user root@ip
linux crontab报以下错误解决 [root@china ~]# crontab -l 拒绝权限You (root) are not allowed…

	错误:you (root) are not allowed to access to (crontab) because of pam configuration.[数据库教程]

linux crontab报以下错误解决

[root@china ~]# crontab -l

拒绝权限
You (root) are not allowed to access to (crontab) because of pam configuration.

解决:

1.查看定时任务的日志/var/log/cron

pam_access(crond:account): access denied for user `root‘ from `cron‘

2. 查看 /etc/pam.d/crond

root>more /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    include    password-auth
auth       include    password-auth

修改文件:

[root@~]# cp /etc/pam.d/crond /etc/pam.d/crond.bak
[root@ ~]# vim /etc/pam.d/crond

account    sufficient   pam_access.so
account    include    system-auth
session    sufficient   pam_loginuid.so
session    include    system-auth
auth sufficient pam_rootok.so auth required pam_env.so auth include system-auth

重启crond 

[root@~]# /etc/init.d/crond restart
停止 crond: [确定]
正在启动 crond: [确定]

 

重新登录root

[root@~]# crontab -e

技术图片

 

 完美解决

 

错误:you (root) are not allowed to access to (crontab) because of pam configuration.

原文地址:https://www.cnblogs.com/xiao-apple36/p/14455157.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/6512.html

(0)
上一篇 2023-04-08
下一篇 2023-04-08

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注