Recovery of Ubuntu User File loss

Source: Internet
Author: User
In the Ubuntu environment, when deleting a common file, the user folder under/home is deleted without a clear prompt. The first response is that all shortcuts in the menu are invalid, because the original links are in the/home/usrname directory. If the directory does not exist, all shortcuts of the day are invalid, restart, enter the user name and account, and the system prompts "user's $ home /. dmrc has been ignored, so the default session and language cannot be saved. The file should be owned by the user and the permission is set

In the Ubuntu environment, when deleting a common file, the user folder under/home is deleted without a clear prompt.

The first response is that all shortcuts in the menu are invalid, because the original links are in the/home/usrname directory. If the directory does not exist, all shortcuts of the day are invalid, restart, enter the user name, account, and system prompt

"The user's $ home/. dmrc has been ignored, so the default session and language cannot be saved. The file should be owned by the user and the permission should be set to 644. The $ home directory of the user should be owned by the user, and other users cannot write data ."

Despite knowing the root account, the system does not allow direct root login in window mode,

So, restart again,

When you are prompted to enter the recovery mode, click "esc ",

Go to the menu options and enter the recovery mode. There are many options. You can enter the top recovery mode,

The system prompts you to enter the root account. If you do not have a root account, you can follow the prompts to perform the operation,

Check that the/home directory does not have a user directory,

Create useradd usrname,

Prompt that the user exists. It seems that the user skill exists, but the directory is gone,

Therefore, create a user directory

Sudo mkdir/home/usrname

Give the user owner and group information,

Sudo chown-R usrname: usrname/home/usrname

(The user name and the specific name of the user group must be determined based on the actual situation)

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.