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

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

 

[root@mylnx2 ~]# crontab -l

 

Authentication token is no longer valid; new one required

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

[root@mylnx2 ~]#

 

 

 

 

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

 

 

[root@mylnx2 ~]# 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-08-22 15:22:08

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

linux中帐户安全加固导致crontab -l无法输出

一.故障现象 数据库用户反馈在oracle用户下执行crontab -l 无法正常输出结果,而且有错误提示:Authentication token is no longer valid; new one required ,You (oracle) are not allowed to access to (crontab) because of pam configuration. .而其他用户执行正常. 二.故障处理与解决 由于提到了pam 配置,所以先是查看了/etc/pam.d/cro

mysql-关于MySQL,Access denied for user 'root '@

问题描述 关于MySQL,Access denied for user 'root '@ 各位大神帮帮忙,Access denied for user 'root '@'192.168.1.102' (using password: YES) 这个问题怎么回事呀,网上搜的解决方法都没有作用,来个大神帮帮忙,谢谢了!我是在自己的项目中登录,然后调用里面的与数据库交互的方法时报错了 解决方案 解决方案: 1.打开MySQL目录下的my.ini文件,在文件的最后添加一行"skip-grant-tabl

Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

案例环境:              操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit           数据库版本 : Mysql 5.6.19 64 bit 案例介绍: 今 天开始学习mysql,遂先安装了Mysql 5.6.19 64bit 版本的数据库,结果安装成功了,但是使用root登录时遇到了ERROR 1045 (28000): Access denied for user 'root'@'loc

Access Logging Tomcat

  73.6 Configure Access Logging server.tomcat.accesslog.buffered=true # Buffer output such that it is only flushed periodically. server.tomcat.accesslog.directory=logs # Directory in which log files are created. Can be relative to the tomcat base dir

让FreeBSD的root用户能够SSH登陆

如果刚装好FreeBSD,默认是不允许root用户登录SSH的,如果登陆结果就会如下: 用PuTTY登陆时,总提示:login as: rootUsing keyboard-interactive authentication.Password:Access denied 这个时候需要编辑其配置文件,输入以下命令进行修改: ee /etc/ssh/sshd_config 然后进行修改. 找到 #PasswordAuthentication no 修改为: PasswordAuthenticati

PHP安全配置

安全 PHP安全配置 创建时间:2001-11-12 更新时间:2003-08-06文章属性:原创文章来源:http://www.xfocus.net文章提交:san (san_at_xfocus.org) 整理:san版本:0.02 创建时间:2001/11/12更新时间:2003/07/21 一.Web服务器安全 PHP其实不过是Web服务器的一个模块功能,所以首先要保证Web服务器的安全.当然Web服务器要安全又必须是先保证系统安全,这样就扯远了,无穷无尽.PHP可以和各种Web服务器结合

通过对php一些服务器端特性的配置加强php的安全

安全|服务器 前面象Shaun Clowes和rfp等都比较详细的介绍了php.cgi程序在编程过程中遇到的问题,以及如何通过应用程序漏洞突破系统,这篇文章我们来通过对php的一些服务器端特性来进行配置加强php的安全.写cgi脚本的时候我们的确一定注意各种安全问题,对用户输入进行严格的过滤,但是常在岸边走哪有不湿鞋,吃烧饼哪有不掉芝麻,人有失蹄马有失手,连著名的phpnuke.phpMyAdmin等程序都出现过很严重的问题,更何况象我等小混混写的脚本.所以现在我们假设php脚本已经出现严重问题

使用php代码加亮函数构造php小后门

函数 [  后门构造 ] 我们知道php非常强大,并且有很多有趣的功能,比如它就自带了一个php代码加亮的函数,叫做:highlight_string,它的参数就是一个字符串,如果这个字符串中包含了PHP代码,那么它将高亮显示,并且直接输出在浏览器中.比如如下的代码:<?phphighlight_string('<?php phpinfo(); ?>');?> 执行后,在浏览器中输出:<code><font color="#000000">

PHP5安装配置和Zend Optimizer安装教程

安装 1.首先下载PHP 5.2.5 (http://www.php.net/downloads.php) 本文PHP安装路径取为c:\php 2.下载后得到php-5.1.2-Win32.zip,直接全部接压至c:\php\目录即可得PHP文件存放目录c:\php: 3.再将c:\php\下的所有dll文件拷到c:\Windows\system32(win2000系统为 c:/winnt/system32/)下,覆盖已有的dll文件: 4.将php.ini-dist用记事本打开,利用记事本的查