如果运行crontab如遇下面这样的错误:

$ crontab -l

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

原因可能是因为用户zhangsan密码过期了。当尝试以密码登录时,会报提示需要立即修改密码:

$ su - zhangsan

Password: 

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

Changing password for zhangsan.

(current) UNIX password: 

如果正好是hadoop集群,由于需要免密码登录,密码不能过期。

可以使用命名chage查看实际情况,比如(请以root用户运行):

#chage -l zhangsan

Last password change                                    : Nov 23, 2015

Password expires                                        : Feb 21, 2016

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 0

Maximum number of days between password change          : 90

Number of days of warning before password expires       : 7

从上可以看到:每90天需要修改一次密码,密码到期前7天会告警。

为了让密码永久有效,可这样设置一下:

chage -M 99999 zhangsan

再次查看:

#chage -l zhangsan

Last password change                                    : Nov 23, 2015

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 0

Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7

not allowed to access to crontab because of pam configuration的更多相关文章

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

    巡检发现一台Linux服务器上的作业没有如期发送邮件,登录服务器检查后发现作业并没有执行,于是检查一下crontab的设置.结果发现如下错误: [root@mylnx2 ~]# crontab -l ...

  2. linux环境,crontab报错Authentication token is no longer valid; new one required You (aimonitor) are not allowed to access to (crontab) because of pam configuration.

    问题描述: 今天同事反应,一个系统上的某些数据没有生成,看了下,怀疑定时任务没有执行,就看下了crontab,发现报了下面的错误: [aimonitor@4A-LF-w08 ~]$ crontab - ...

  3. linux crontab 鉴定令牌不再有效,需要新的鉴定令牌 [ You (root) are not allowed to access to (crontab) because of pam configuration.]

    用户root 解决方法: 用root用户,执行 chage -M 99999 root 更改有效期为99999天.

  4. You (oracle) are not allowed to access to (crontab) because of pam configura

    用oracle用户添加备份计划任务,crontab -e,提示:You (oracle) are not allowed to access to (crontab) because of pam c ...

  5. Authentication token is no longer valid

    Linux: Authentication token is no longer valid Problem: Authentication token is no longer valid; new ...

  6. /etc目录深入理解

    /etc This is the nerve center of your system, it contains all system related configuration files in ...

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

    设置一个网络环境可能涉及到许多步骤,才能为开始安装做好准备.您必须: 配置服务,比如 DHCP.TFTP.DNS.HTTP.FTP 和 NFS 在 DHCP 和 TFTP 配置文件中填入各个客户端机器 ...

  8. Linux系统自动化安装之cobbler实现

    一.cobbler简介 cobbler是快速网络安装linux操作系统的服务,支持众多的Linux发行版本,如redhat|.fedora.centos.debian.ubuntu和suse,也可以支 ...

  9. Access Logging Tomcat

    73.6 Configure Access Logging server.tomcat.accesslog.buffered=true # Buffer output such that it is ...

随机推荐

  1. Python的isdigit()和isalpha()

    提供一个参考链接<isalpha() Method> 使用isdigit()判断是否是全数字: if  word.encode( 'UTF-8' ).isdigit() 使用isalpha ...

  2. Javascript 函数传参问题

    属于传值,不能改变参数的属性 example 1  function Myvalue(){ var arry = 5; return arry ; } document.getElementById( ...

  3. keras各种优化方法总结 SGDmomentumnesterov

    http://blog.csdn.net/luo123n/article/details/48239963 前言 这里讨论的优化问题指的是,给定目标函数f(x),我们需要找到一组参数x,使得f(x)的 ...

  4. 运行Maven项目时出现invalid LOC header (bad signature)

    为Maven小白,今天这问题困扰了我好久,经过多次在网上查询,终于找到了原因.明明一个小问题却耗费很多时间,着实不应该,所以必须记录一下. 报错信息如下:   对话框: 控制台: <span s ...

  5. 安装RabbitMq-----windows

    在官网download我们所需要的版本,安装rabbitMq需要erlang支持 rabbitMq :http://www.rabbitmq.com/download.html erlang  :ht ...

  6. 登录时显示403 Access Denied

    用户名及密码设置如下: 在tomcat安装目录\conf\tomcat-users.xml中的<tomcat-users>标签内设置: <role rolename="ma ...

  7. mysql 常用option

    [mysql 常用option] --host=host_name, -h host_name Connect to the MySQL server on the given host. --por ...

  8. 122. Best Time to Buy and Sell Stock II (Array;Greedy)

    Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...

  9. 60. Permutation Sequence (String; Math)

    The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the p ...

  10. 【校招面试 之 C/C++】第28题 C++ 内存泄漏的检查

    1.memwatch的使用 (1)首先去官网上下载源码: http://www.linkdata.se/sourcecode/memwatch/ 解压得到memwatch.c以及memwatch.h两 ...