Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of being unable to log in after entering the user account password in linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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

Enter the user name and password when logging in to Ubuntu, and a successful login prompt appears on the tty1 terminal, where my user name is linux. By default, my user name is entered into the current user's home directory (my user name is linux, the main directory is / home/linux/), which can be viewed using the pwd command. If not, you can enter the following command:

$cd ~

Or

$cd / home/linux/

Note: my user name here is linux, which will be changed according to my actual situation.

Execute the command to 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 a corresponding name for other user names)

Then enter at the terminal prompt:

$ls .Xauthority-l

When correct, it displays:-rw- 1 linux linux 100 January 4 17:09 .Xauthority, by which time the owner has become the user

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

Extend:

Linux command

Restart command

1 、 reboot

2. Shutdown-r now restarts immediately (used by root users)

3. Shutdown-r 10 automatically restarts after 10 minutes (used by root users)

4. Shutdown-r restarts at 20:35 at 20:35 (for root users)

If the restart is set up through the shutdown command, you can cancel the restart with the shutdown-c command

Shutdown command

1. Halt shuts down immediately

2. Poweroff shuts down immediately

3. Shutdown-h now shuts down immediately (used by root users)

4. Shutdown-h shuts down automatically after 10 minutes.

If the shutdown is set through the shutdown command, you can cancel the restart with the shutdown-c command

These are the details that you can't log in when you enter the correct password under linux. Please pay attention to other related articles for more information.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report