RedHatLinux user logon authentication failed

Source: Internet
Author: User
Today, the customer reported a problem. ssh is not on its own server. When you log on to RedHatLinux (level 3) in the IDC, the following message is displayed when you press enter by root: Youraccountislocked. maximumamountoffailedattemptswasreached. good to say, pam_tally2-uroot in single user mode (faillog-uroot & l

Today, the customer reported a problem. ssh is not on its own server. When you log on to the RedHat Linux system (level 3) in the IDC, the following prompt is displayed:

Your account is locked. Maximum amount of failed attempts was reached.

In single-user mode

Pam_tally2-u root (faillog-u root <查看 var log faillog内记录的登陆失败信息> ) Displays the number of Logon failures of the root user.

Pam_tally2-u root-r (faillog-u root-r <重置 var log faillog内记录的登陆失败信息> ) Reset the number of Logon errors to 0.

Then restart (in 5-level mode) and enter the user name and password, prompting Authontication failed.

Continue single-user mode

Authconfig -- disableldap -- update

Vi/etc/pam. d/system-auth

# % PAM-1.0

# This file is auto-generated.

# User changes will be destroyed the next time authconfig is run.

Auth requeired pam_tally2.so deny = 5 lock_time = 30 even_deny_root root_unlock_time = 30

Auth required pam_env.so

Auth sufficient pam_unix.so nullok try_first_pass

Auth requisite pam_succeed_if.so uid >=500 quiet

Auth required pam_deny.so

 

Account required pam_unix.so

Account sufficient pam_localuser.so

Account sufficient pam_succeed_if.so uid <500 quiet

Account required pam_permit.so

Password requisite pam_cracklib.so try_first_pass retry = 3 type =

Password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_au

Thtok

Password required pam_deny.so

 

Session optional pam_keyinit.so revoke

Session required pam_limits.so

Session [success = 1 default = ignore] pam_succeed_if.so service in crond quiet

Use_uid

Session required pam_unix.so

The culprit is the line in the red font. Please add a line in front of the red font # all problems are solved, and the system user can log on normally.

Red Hat Enterprise Linux 7 Users download http://www.linuxidc.com/Linux/2014-06/102998.htm now

RHEL 6.3 installation tutorial graphic details http://www.linuxidc.com/Linux/2014-05/101845.htm

Red Hat Linux 7.0 installation illustrationHttp://www.linuxidc.com/Linux/2014-06/103190.htm

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-06/103626.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.