深入理解Linux基础安全
1. 密码设置与老化
在Linux系统中,合理设置用户密码的老化策略至关重要。以 tim 账户为例,可通过 chage 命令查看和修改密码相关设置。
- 查看密码设置 :
# chage -l tim | grep Password
Password expires : never
Password inactive : never
这表明当前 tim 账户的密码没有设置过期和停用时间。
- 设置账户锁定时间 :若仅使用 -I 选项设置密码过期后账户锁定时间,而未设置密码过期时间,该设置将无效。
# chage -I 5 tim
# chage -l tim | grep Password
Password expires : never
Password inactive : never
- 有效设置密码老化 :需要同时使用
-M选项设置密码最大使用天数,使密码过期和停用时间设置生效。
Linux系统安全配置与监控
超级会员免费看
订阅专栏 解锁全文
3261

被折叠的 条评论
为什么被折叠?



