The processing method of Linux and Unix root password forgetting

Source: Internet
Author: User
Keywords Password processing side nbsp;
Tags aliyun directory etc html http linux log in name

&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; One: The solarisroot password forgets the processing method:

1, if you can log in with a regular user,%df/etc, determine the name of the device containing the ETC directory partition

%df/etc

//dev/ds
K/c0t0d0s0 ...

In this case, slice, if your root partition device is different, you can replace it.

2, insert the system disk into the CDROM

3, refresh the file system using the Sync command after the prompt appears

4, press Stop+a

5, "OK" state type boot Cdrom-s

6, type mkdir/temp at the # prompt, and then type mount/dev/dsk/c0t0d0s0/temp

If there is a situation where the hook is not on, then run fsck to Fsck/dev/rdsk/c0t0d0s0 and then mount

7,cd/temp/etc

8,CP Shadow Shadowbak

9,cat Shadow

Get the password string for root

root:djglcj0j:6453::: Where djglcj0j is the encrypted password string of root

10,sed s/djglcj0j//shadow>shadownew

11,cat Shadownew See if it has changed to

root::6453:::

12,CP Shadownew Shadow

13,CD/

Unmount/temp

Sync

Shutdown-i0-g0-y

14, after removing the CD, reboot the system, then root does not need the password!

That's OK!

OK Boot Cdrom-s

#TERM =sun

#export TERM

#mount/dev/dsk/c0t0d0s0/a

#vi/a/etc/shadow (Delete encrypted password for root)

#reboot

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.