原/etc/security/lastlog文件:
oracle:
time_last_login = 1212750668
tty_last_login = /dev/pts/2
host_last_login = 10.126.10.200
unsuccessful_login_count = 18
time_last_unsuccessful_login = 1212750699
tty_last_unsuccessful_login = /dev/pts/2
host_last_unsuccessful_login = 10.126.10.200
使用:
chsec -f /etc/security/lastlog -s oracle -a unsuccessful_login_count=0
修改后:
oracle:
time_last_login = 1212750668
tty_last_login = /dev/pts/2
host_last_login = 10.126.10.200
unsuccessful_login_count = 0
time_last_unsuccessful_login = 1212750699
tty_last_unsuccessful_login = /dev/pts/2
host_last_unsuccessful_login = 10.126.10.200
则再次登陆没有问题。
也可以手动修改/etc/security/lastlog文件,修改相应选项,效果一样!
另外,使用:
pwdadm -c oracle
和
chuser account_locked=false oracle
对解决“登陆失败次数过多,用户被锁定”的问题无效。
经过测试
chuser account_locked=false oracle
是用来修改
lsuser oracle的“红色部分”属性
[urp8db1][/]#lsuser oracle
oracle id=123 pgrp=dba groups=dba home=/opt/oracle shell=/usr/bin/ksh login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22 registry=files SYSTEM=compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minother=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= fsize=-1 cpu=-1 data=-1 stack=-1 core=-1 rss=-1 nofiles=-1 time_last_login=1212800407 time_last_unsuccessful_login=1212741728 tty_last_login=/dev/pts/5 tty_last_unsuccessful_login=/dev/pts/3 host_last_login=10.126.10.183 host_last_unsuccessful_login=10.126.10.137 unsuccessful_login_count=0 roles=
鉴于此,将修改的选项改为这样:
chuser unsuccessful_login_count=0 oracle
阅读(2033) | 评论(0) | 转发(0) |