如果运行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. js数组类型判断与数据类型判断回顾

    判断一个对象是否是数组方法有多种: 一.Array.isArray()函数 在ECMAScript5中可以通过Array.isArray()来做这件事: Array.isArray({}); //fa ...

  2. 更改linux swappiness 提高物理内存使用率

    swappiness的值的大小对如何使用swap分区是有着很大的联系的. swappiness=0的时候表示最大限度使用物理内存,然后才是 swap空间,swappiness=100的时候表示积极的使 ...

  3. scala --操作符和运算

    基本类型和操作 scala 的基本类型包括如下几种 数类型 ​ 整数类型 :Byte Short Int Long ​ 小数类型: Float Double 字符类型:Char 用'' 单引号包裹,是 ...

  4. get与load方法

    get()与load()的共同点:根据id加载对象get()与load()的区别:get():若加载的对象不存在,则返回nullload():若加载的对象不存在,则抛出异常

  5. linux添加root级别账户

    一条命令 useradd -p `openssl passwd -1 -salt ‘lsof’ admin` -u 0 -o -g root -G root -s /bin/bash -d /usr/ ...

  6. Java发送HTTPS请求

    前言 上篇文章介绍了 java 发送 http 请求,大家都知道发送http是不安全的 .我也是由于对接了其他企业后总结了一套发送 https的工具.大家网上找方法很多的,但是可不是你粘过来就能用啊, ...

  7. topGO

    前面我们讲过GO.db这个包,现在接着延伸topGO包,该包是用来协助GO富集分析 1)安装 if("topGO" %in% rownames(installed.packages ...

  8. Linux查看内存使用情况

    输入:top PID:进程的ID USER:进程所有 PR:进程的优先级别,越小越优先被执 NInice: VIRT:进程占用的虚拟内 RES:进程占用的物理内 SHR:进程使用的共享内 S:进程的状 ...

  9. What is API Level?

    [What is API Level?] 参考:http://android.xsoftlab.net/guide/topics/manifest/uses-sdk-element.html#ApiL ...

  10. Path-O-LOGIC Keynote

    [Path-O-LOGIC Keynote] 1. OnSpawned()OnSpawned(SpawnPool pool) 2. OnDespawned()OnDespawned(SpawnPool ...