linux密码过期提醒通知,Linux账户密码过期安全策略设置

本文介绍了Linux系统中如何设置账户密码过期安全策略,包括密码最大使用天数、最小更改间隔、警告期限等,并展示了如何解决因密码过期导致的crontab作业执行问题。通过编辑/etc/login.defs文件可以控制这些参数,但修改仅对新创建用户生效。对于已存在的用户,如需设置密码永不过期,可使用chage命令进行调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Linux账户密码过期安全策略设置、Linux账号密码过期会导致crontab作业不能执行

最近因用oracle用户执行shell脚本做定时备份脚本任务,在执行crontab命令有如下报错:$ crontab -l

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

在网上找了些资料解决方式说明如下:

在Linux系统管理中,有时候需要设置账号密码复杂度(长度)、密码过期策略等,这个主要是由/etc/login.defs参数文件中的一些参数控制的的。它主要用于用户账号限制,里面的参数主要有下面一些:

/etc/login.defs:# cat /etc/login.defs

#

# Please note that the parameters in this configuration file control the

# behavior of the tools from the shadow-utils component. None of these

# tools uses the PAM mechanism, and the utilities that use PAM (such as the

# passwd command) should therefore be configured elsewhere. Refer to

# /etc/pam.d/system-auth for more information.

#

# *REQUIRED*

#   Directory where mailboxes reside, _or_ name of file, relative to the

#   home directory.  If you _do_ define both, MAIL_DIR takes&nbs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值