Exadata修改sshd密码验证方式 延迟10分钟关闭 明明密码对了却登录不上

如果你的Exadata明明密码对了,却登录不上,不要着急因为Exadata输入一次密码错误会锁定10分钟。

进入目录修改配置文件

[root@cwztdb01 ~]# cd /etc/pam.d/ [root@cwztdb01 pam.d]# ls chfn fingerprint-auth password-auth remote serviceconf sshd sudo-i system-config-services chsh login password-auth-ac runuser smartcard-auth sssd-shadowutils su-l systemd-user config-util other polkit-1 runuser-l smtp su system-auth vlock crond passwd postlogin screen smtp.sendmail sudo system-auth-ac [root@cwztdb01 pam.d]# vi sshd #%PAM-1.0 auth required pam_sepermit.so auth substack password-auth auth include postlogin # auth required pam_tally2.so deny=5 onerr=fail lock_time=600 serialize -->注释掉这里 # Used with polkit to reauthorize users in remote sessions -auth optional pam_reauthorize.so prepare # EXADATA ACCESS CONTROL via /etc/exadata/security/exadata-access.conf account required pam_access.so accessfile=/etc/exadata/security/exadata-access.conf account required pam_nologin.so account include password-auth account required pam_tally2.so password include password-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session required pam_loginuid.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open env_params session required pam_namespace.so session optional pam_keyinit.so force revoke session include password-auth session include postlogin # Used with polkit to reauthorize users in remote sessions -session optional pam_reauthorize.so prepare session required pam_limits.so #重启sshd [root@cwztdb01 pam.d]#/bin/systemctl restart sshd.service


#同样的如果通过ilom登录你需要将login也修改了
[root@cwztdb01 ~]# cd /etc/pam.d/
[root@cwztdb01 pam.d]# vi login
# auth       required     pam_tally2.so deny=5 onerr=fail lock_time=600 serialize -->注释掉这里


#如果你的用户已经被锁住了,恰好你又还有一个ssh窗口。
[root@dm03db01 ~]# pam_tally2
Login Failures Latest failure From
ora112 4 04/07/18 19:46:10 dm03db02.corp.haier.com
oemagent 36 05/31/18 08:33:17 dm03db02.corp.haier.com
patrol 2 05/06/18 20:54:50 hrctxapp5.corp.haier.com

移除锁定用户:

[root@dm03db01 ~]# pam_tally2 -r -u oemagent
Login Failures Latest failure From
oemagent 36 05/31/18 08:33:17 dm03db02.corp.haier.com

#另外我建议你把grid、oracle的密码策略修改一下,否则你60天就要修改一次密码了
 
[root@cwztdb01 ~]#  chage -m 0 -M 99999 -E -1 grid

 [root@cwztdb01 ~]#  chage -m 0 -M 99999 -E -1 oracle

 

 

 

 

 

 

 

login

posted @ 2020-11-11 23:19  lizhao01  阅读(121)  评论(0编辑  收藏  举报