如果运行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. 转载:MySQL和Redis 数据同步解决方案整理

    from: http://blog.csdn.net/langzi7758521/article/details/52611910 最近在做一个Redis箱格信息数据同步到数据库Mysql的功能. 自 ...

  2. Haskell语言学习笔记(49)ByteString Text

    Data.ByteString String 是 [Char] 的同义词,在使用上存在List的惰性所带来的性能问题. 在处理大型二进制文件时,可以使用 ByteString 来代替 String. ...

  3. MySQL Installation of system tables failed!

    刚开始学习Linux,就遇到了问题. 当在RedHat下安装MySQL时提示如下错误,请高手给点指点,谢谢: rpm -vih  MySQL-server-community-5.0.96-1.rhe ...

  4. 最短路径-Dijkstra算法(转载)

    注意:以下代码 只是描述思路,没有测试过!! Dijkstra算法 1.定义概览 Dijkstra(迪杰斯特拉)算法是典型的单源最短路径算法,用于计算一个节点到其他所有节点的最短路径.主要特点是以起始 ...

  5. mysql异常

    一.Can't connect to MySQL server on 'localhost' (10061)翻译:不能连接到 localhost 上的mysql分析:这说明“localhost”计算机 ...

  6. SpringMVC源码总结(一)HandlerMapping和HandlerAdapter入门

    SpringMVC在使用过程中,大多是使用注解,对它的实现接口之类的关系理解变得模糊, 通过对XML配置的理解,可以理清各个类的关系,譬如控制器类要实现Controller接口. 接触SpringMV ...

  7. 微信公众平台开发之基于百度 BAE3.0 的开发环境搭建(采用 Baidu Eclipse)

    3.通过 SVN 检入工程     在 bae 上的应用添加部署成功后,如图 7     点击“点击查看”按钮,会打开一个新页面,页面上会打印 “hello world” ,这是因为我们的应用包含有示 ...

  8. Housewife Wind(边权树链剖分)

    Housewife Wind http://poj.org/problem?id=2763 Time Limit: 4000MS   Memory Limit: 65536K Total Submis ...

  9. 【转】从源码浅析MVC的MvcRouteHandler、MvcHandler和MvcHttpHandler

    原文:http://www.cnblogs.com/jeffwongishandsome/archive/2012/01/08/2316521.html 熟悉WebForm开发的朋友一定都知道,Pag ...

  10. Halcon的编程语法与数据处理——第8讲

    1.跟其他语言不完全一致的表达符号 赋值符号  := 引号      ' ' (一律是单引号) 求商求余  /   % (一个整数除以另一个数,如何使商是实型的?即浮点型) 逻辑运算  and  or ...