返回顶部
首页 > 资讯 > 数据库 > 错误:you (root) are not allowed to access to (crontab) because of pam configuration.
  • 801
分享到

错误: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 con


	错误: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

您可能感兴趣的文档:

--结束END--

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

本文链接: https://lsjlt.com/news/8079.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作