/etc/security/user
我想使用脚本更改 AIX 操作系统中文件中的参数设置。这是示例用户文件。
default:
admin = false
login = true
su = true
daemon = true
rlogin = true
sugroups = ALL
admgroups =
ttys = ALL
auth1 = SYSTEM
auth2 = NONE
tpath = nosak
umask = 022
expires = 0
SYSTEM = "compat"
logintimes =
pwdwarntime = 5
account_locked = false
loginretries = 6
histexpire = 0
histsize = 5
minage = 1
maxage = 12
maxexpired = 5
minalpha = 0
minother = 1
minlen = 8
mindiff = 0
maxrepeats = 2
dictionlist =
pwdchecks =
我想用以下值替换参数值:
pwdwarntime = 5
loginretries = 6
histsize = 5
minage = 1
maxage = 4
maxexpired = 5
minalpha = 2
minother = 1
minlen = 8
mindiff = 0
答案1
您可以使用该chsec
命令来执行此操作。
chsec -f /etc/security/user -s default pwdwarntime=5 loginretries=6
man chsec
了解完整详情。