How to obtain the lost password again in linux

Source: Internet
Author: User
Tags lost password
In linux, how can I re-obtain the lost password? in linux, if I forget the user password, it will be very troublesome and difficult to re-obtain it. The following method can be used to reset the user's password for Ele. me: First, we will introduce the command useraddusername for creating/deleting an account in linux & amp; #39...
In linux, how can I re-obtain the lost password? in linux, if I forget the user password, it will be very troublesome and difficult to re-obtain it. You can reset the user's password for Ele. me using the following method: first, we will introduce the linux account creation/deletion command useradd username -- add a user to generate a corresponding folder named passwd username under the home directory -- add a password for the username user, if the parameter "username" is not specified, the password userdel username is set for the current user -- delete the user, but do not delete the user's corresponding folder userdel-r username -- delete the user and its corresponding folder. In addition, we will introduce several linux running levels in linux. There are 7 running levels in linux, which are: 0: shutdown ---- in this mode, the system will shut down once it is started. 1: Single user www.2cto.com 2: multiple users without network 3: multiple users with network (most commonly used) 4: The system is not used, retained to user 5: graphic interface starts up and enters graphical interface 6: The system restarts after the system is started note: two red running modes (3 and 5) it is a common method to modify the default running level. you can modify the id: 5: initdefault: in the/etc/inittab file to reset the password for this line. (red hat is used as an example, other systems are not necessarily feasible) (1) when the boot enters the boot interface, click 'e', 1 in the boot program (grub in redhat)

Then enter the following interface, as shown in Figure 2:

(2) select the second row and enter another e

(3) select the second row and enter another e

Enter 1 after entering the modification page and press Enter. Note that there is a space between/and 1. this 1 represents the 1 (single user level] user-level www.2cto.com (4) then press B to enter the single-user mode.

After entering the Level 1, you can change the passwd username password again. at this time, the system does not require entering the old password. the new password is set here. Finally, by setting the default running level to 3 or 5, the password is the principle of the new password upon restart: In linux, it will be read first at startup. the parameter set in/etc/inittab will skip this process only when the 1st [single user] level is set. after entering the system, you can change the user password, finally, you can set the running level back. To modify the default running level, you can modify the id: 5: initdefault in the/etc/inittab file.
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.