Modify the. profile file of a non-current account in ubuntu
Source: Internet
Author: User
Non-local account in ubuntu. the profile file was accidentally modified in the account today. profile file, so that the account cannot enter after the restart, click the account to log on to the black screen, and then return to the account login page again. After some tossing, I finally successfully modified the original account. profile file... non-local account in ubuntu. the profile file was accidentally modified in the account today. profile file, so that the account cannot enter after the restart, click the account to log on to the black screen, and then return to the account login page again. After some tossing, I finally successfully modified the. profile file in the original account and successfully re-entered the original account. My initial thought was to create a new administrator account and modify the one under the original administrator account in the new account. profile file. after being created, it is found that ubuntu still has good Account Control. even if you have the password of the original account, you cannot escalate the permissions of the new account to the height where the original account file can be modified. Therefore, this pattern is used instead, but many details are described, mainly to provide ideas for everyone. The modification process is as follows: first create an administrator account and enter. Enter the directory home/original account in the terminal. Run the vi command to edit the. profile file. Log on to the original account again. Command: in the terminal, cd/home/my (my is my original account name) sudo vi. commands that may be used in profile vi: insert text commands (esc exits upon insertion) I: before the cursor I: At the beginning of the current line a: After the cursor: at the end of the current row o: open a new line under the current row O: open a new line above the current row r: replace the current character R: replace the current character and the character behind it, until press ESC key s: starting from the current cursor position, replace the specified number of characters with the input text S: delete the specified number of rows, replace "ncw" or "nCW" with the entered text: modify the number of nCC words: modify the number of lines to delete the command ndw or ndW: delete the N-1 words "do" at the beginning and after the cursor: delete to the beginning of the line d $: delete to the end of the line ndd: delete the current line and the next n-1 lines x or X: Delete a character, x deletes the cursor, while X deletes the Ctrl + u before the cursor: deletes the input text in the input mode to save and exit the command (note ":" cannot be omitted): w: save the current File: x: save the current file and exit: q: Exit vi: q!: Do not save the file and exit vi modification. save and exit. then, log on to the original account again. If the vi command is not enough, you can use Baidu. If you do not understand the. profile content, you can refer to the. profile file content modification under the new account. In addition, if you do not create an account, you must select the root mode (the title is root) in the repair option. the command is the same. Finally, we strongly recommend that you try it out. you can create a new management account, set the management account to read and write permissions in the original account, and directly log on to the management account to modify the profile file. save the profile file.
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.