Linux local account password cannot login (shell can log in), always return to login login interface

Source: Internet
Author: User

Today I ran into a problem with my virtual machine test. Login CentOS always return login, account number and password Yes, I also changed two users.

1. Description of the problem

I normally enter the user name and password

Error tip: Return to login interface, I try again another Oracle User discovery is the same return login

2. Error analysis

I baidu a bit of error, and later found an article related to this issue http://blog.itpub.net/35489/viewspace-620915/, because I just yesterday with my virtual machine test installed Oracle.

I found out because I made a modification to the/etc/pam.d/login file yesterday when I installed Oracle. Later the query to know that I added the statement has a problem

There was a problem with my statement restriction statement:

#session required/lib64/security/pam_limits.so This is the corresponding 64-bit,
Session required/lib/security/pam_limits.so This corresponds to 32 bits, and the reason I'm having a problem is that I'm using 32-bit statements and I'm a 64-bit system.

3. Workaround

I looked for a long time, almost to re-install the system later found two ways to solve.

I checked the information online http://blog.itpub.net/15480802/viewspace-1406088/, found pam_securetty.so read/etc/securrety, set the root user can log on the terminal, It is not possible to use the root user to log on only if the TTY is set and not pts/0,telnet, and the sshd is not used to the module and is not restricted;

Through this analysis and data search, I found two solutions.

a). SSH CRT can be connected to the computer, and the IP is known

Through the SSH CRT class software remote connection system, and then change the file Vi/etc/pam.d/login, the session required/lib/security/pam_limits.so changed to session Required/lib 64/security/pam_limits.so

(1:crt connection is attached.) At the beginning of the work, I will not, no one told me, I will not be embarrassed to ask, asked the people around also refused to seriously tell me.

(The operation with 2:vim editor can be edited by pressing keyboard I into text mode, otherwise the command mode cannot be edited.)  Exit text mode is ESC (key) and then press: (symbol, keyboard Shif +;: key) then save is input wq, if done operation not saved is q!  。 This is simple, but if I do not know also embarrassed, I was the first time in the work of contact with this is not very good time by the colleagues around the scold and ridicule. Just be willing to work hard. )

The second method: for the practice of the Internet, can not connect SSH CRT software

This method is more stupid, is to restart the system, into the Linux but mode mode. How to enter the single mode system http://jingyan.baidu.com/article/7e440953f87f4a2fc0e2ef90.html

This method can also be applied to retrieve a password. But this time this entry but the mode reset password is not working, at least I tried to reset the password or not.

After entering the single mode mode, directly then change the file Vi/etc/pam.d/login, the session required/lib/security/pam_limits.so changed to session Required/lib64/secur Ity/pam_limits.so

Attached 3: How to enter the single mode mode simple introduction: Restart the system, and then on the landing screen, press the keyboard E to enter as

Select the second kernel, then enter 1 or single and go to enter, and then press B to wait for a moment to enter the one-user mode, in this mode to modify the operation.

4. Re-login to normal use

Linux local account password cannot login (shell can log in), always return to login login interface

Related Article

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.