You (root) are not allowed to access to (crontab) because of pam configuration

巡检发现一台Linux服务器上的作业没有如期发送邮件,登录服务器检查后发现作业并没有执行,于是检查一下crontab的设置。结果发现如下错误:

[[email protected] ~]# crontab -l

Authentication token is no longer valid; new one required

You (root) are not allowed to access to (crontab) because of pam configuration.

[[email protected] ~]#

查看了一下/etc/pam.d/crond,仔细检查后发现我们设置了密码过期策略,当密码过期后,作业由于权限认证是不会执行的,这个可以参考Linux账号密码过期会导致crontab作业不能执行Linux账户密码过期安全策略设置

[[email protected] ~]# 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账号, 那如果密码过期了后,你怎么使用root登录呢? 其实这里我们访问服务器通过Jump Server(跳板机)登录,登录后使用sudo su - 切换到root账号,所以没有遇到类似下面需要修改密码的通知。

You are required to change your password immediately (password aged)

Last login: Wed Jun 28 15:42:13 2017 from xxx.xxx.xxx.xxx

Changing password for root.

(current) UNIX password:

时间: 2024-11-13 06:35:50

You (root) are not allowed to access to (crontab) because of pam configuration的相关文章

You (root) are not allowed to access to (crontab)

先检查/var/log/messages和/var/log/secure中是否有错误提示,有则修复. 我碰到的情况是账号密码过期了,需要从新设置,在/var/log/secure中查到 Jun 12 11:06:40 ServiceVM0787 crontab: pam_unix(crond:account): expired password for user root (root enforced) 如果解决不了,再打开配置文件/etc/security/access.conf, 在 - :

Hive JDBC:java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate anonymous

今天使用JDBC来操作Hive时,首先启动了hive远程服务模式:hiveserver2 &(表示后台运行),然后到eclipse中运行程序时出现错误: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.182.11:10000/default: Failed to open new session: java.lang.RuntimeException: org.

hiveserver2连接报错: User: root is not allowed to impersonate anonymous (state=08S01,code=0)

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 使用HiveServer2运行时,启动好HiveServer后运行 private static String url = "jdbc:hive2://192.168.213.132:10000/default"; 连接hiveserver2时 出现 java.lang.RuntimeException: org.apache.hado

beeline启动时,错误 User: root is not allowed to impersonate root

错误: beeline>!connect jdbc:hive2://192.168.33.01:10000 root rootConnecting to jdbc:hive2://192.168.33.01:10000Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.Aut

User: root is not allowed to impersonate admin

<property>             <name>hadoop.proxyuser.root.hosts</name>             <value>*</value>      </property>     <property>             <name>hadoop.proxyuser.root.groups</name>             <value&

beeline连接hiveserver2报错:User: root is not allowed to impersonate root

在hadoop的配置文件core-site.xml中添加如下属性:<property>        <name>hadoop.proxyuser.root.hosts</name>        <value>*</value></property><property>        <name>hadoop.proxyuser.root.groups</name>        <valu

Authentication token is no longer valid

Linux: Authentication token is no longer valid Problem: Authentication token is no longer valid; new one required You (zabbix) are not allowed to access to (crontab) because of pam configuration. PAM Configuration The /etc/pam.d/ directory contain th

使用 Cobbler 自动化和管理系统安装

设置一个网络环境可能涉及到许多步骤,才能为开始安装做好准备.您必须: 配置服务,比如 DHCP.TFTP.DNS.HTTP.FTP 和 NFS 在 DHCP 和 TFTP 配置文件中填入各个客户端机器的信息 创建自动部署文件(比如 kickstart 和 autoinst) 将安装媒介解压缩到 HTTP/FTP/NFS 存储库中. 这个过程并不简单,而且手动注册每个必须配置的客户端机器可能很麻烦.对配置一台机器的任何参数更改(比如要使用一个不同的操作系统),都需要对配置进行手动干预,并有可能对自

Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password:YES)

转]MySql错误代码1045的解决方案 错误代码 1045Access denied for user 'root'@'localhost' (using password:YES) Access denied for user 'root'@'localhost' (using password:YES)