Home >Operation and Maintenance >Linux Operation and Maintenance >Cannot log in even after entering the correct password under Linux

Cannot log in even after entering the correct password under Linux

王林
王林Original
2019-12-02 15:41:208640browse

Cannot log in even after entering the correct password under Linux

In the login interface where you need to enter a password, press the ctrl alt F1 key combination to enter the tty1 terminal

Cannot log in even after entering the correct password under Linux

Enter when logging in to Ubuntu The user name and password, a successful login prompt appears in the tty1 terminal. My user name here is linux, and by default it enters the current user's home directory (my user name is linux, and the home directory is /home/linux/). You can use the pwd command Check. If not, you can enter the following command:

$ cd ~

or

$ cd /home/linux/

Related learning video tutorial sharing: linux video tutorial

Note: Me The username here is linux, change it according to your actual situation

Cannot log in even after entering the correct password under Linux

Execute the command and change the owner of Xauthority to user linux

$ sudo chown linux:linux .Xauthority

Note: My user name is linux, so chown is followed by linux:linux. If you change it to the corresponding name for other user names, you can change it to the corresponding name)

Cannot log in even after entering the correct password under Linux

Then enter after the terminal prompt:

$ ls .Xauthority -l

If it is correct, it will be displayed: -rw------- 1 linux linux 100 January 4 17:09 .Xauthority, At this time the owner has become the user

Cannot log in even after entering the correct password under Linux

Press ctrl alt F7 to switch back to the graphical login interface and log in

Cannot log in even after entering the correct password under Linux

Recommended related article tutorials: linux tutorial

The above is the detailed content of Cannot log in even after entering the correct password under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn