Home >Operation and Maintenance >Linux Operation and Maintenance >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
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
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)
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
Press ctrl alt F7 to switch back to the graphical login interface and log in
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!