I. Solution 1 for forgetting the solarisROOT password. if you can log on with a common user, % df/etc, confirm the device name % df/etc/dev/dsk/c0t0d0s0 that contains the/etc directory partition... in this example, it is c0t0d0s0. if your root directory partition device is different, replace it
I. What should I do if I forget the solarisROOT password?
1. if you can log on with a common user, % df/etc, and confirm the device name that contains the/etc directory partition.
% Df/etc
// Dev/dsk/c0t0d0s0...
In this example, it is c0t0d0s0. if your root directory partition device is different, you can replace it.
2. Insert the system disk into the cdrom.
3. use the sync command to refresh the file system
4. press stop +
5. in the "OK" status, type boot cdrom-s.
6. at the "#" prompt, type mkdir/temp and then mount/dev/dsk/c0t0d0s0/temp
If the connection fails, run fsck first fsck/dev/rdsk/c0t0d0s0, and then mount
7, cd/temp/etc
8, cp shadow shadowbak
9, cat shadow
Obtain the root password string.
Root: djglcj0J: 6453 ::: Where djglcj0J is the root encrypted password string)
10, sed s/djglcj0J // shadow> shadownew
11. check whether cat shadownew has changed
Root: 6453 ::::
12, cp shadownew shadow
13, cd/
Unmount/temp
Sync
Shutdown-i0-g0-y
14. after removing the CD and restarting the system, the root user does not need the password!
This is also acceptable!
OK boot cdrom-s
# TERM = sun
# Export TERM
# Mount/dev/dsk/c0t0d0s0/
# Vi/a/etc/shadow (delete the root encrypted password)
# Reboot
II. restore the sco unix super user password
Once the super user password of the sco unix machine is forgotten, you can use this method.
Run the mkdev fd command or command Floppy Filesystem Manager of Filesystem in scoadmin to create an emergency boot disk, including the Boottable disk and Root filesystem disk.
Install the created Root filesystem disk on the hard disk.
# Mount/dev/fd0135ds18/mnt
Copy the/etc/passwd and/tcb/files/auth/r/root files on the hard disk to the Root filesystem disk.
# Cp/etc/passwd/mnt
# Cp/tcb/files/auth/r/root/mnt
Detach a floppy disk from Machine 1.
# Umount/dev/rfd0135ds18
Use the Boot floppy disk to start the machine that forgets the password and insert the Root filesystem floppy disk as prompted. when "#" is displayed, perform the following operations to mount the hard disk to the floppy disk:
# Mount/dev/hd0root/mnt
Back up the/etc/passwd and/tcb/files/auth/r/root files on the hard disk. Because these two files also contain registration information of other users.
Use two files on the Root filesystem floppy disk to overwrite the two files on the hard disk:/etc/passwd and/tcb/files/auth/r/root.
# Mkdir/cyh
# Mount/dev/fd0135ds18/cyh
# Cd/cyh
# Cp passwd/mnt/etc
# Cp root/mnt/tcb/files/auth
Uninstall the two installed file systems.
# Umount/dev/hd0root
# Umount/dev/fd0135ds18
Remove the floppy disk and restart the machine. When Login appears, register with the Root user and enter the superuser password of the second machine to access the Super User.
After entering the superuser, use the backup files Passwd and Root to overwrite the original files, and then use the passwd command to modify the superuser password.
You can use Alt + F2 for another window and register it as Root. now you can use the modified password.
III. loss of the root password of aix4.3.3 (ibm) rs/6000
Place the first installation disk into the optical drive, restart the machine, press f5, and press 5 on the terminal to go to the maintance page. select the mount rootvg function option, call password to modify the password, and exit.
4. freebsd's root password is lost.
FreeBSD 4.7
When "boot... 9 seconds" is displayed, press
Input: boot-s
After login
#/Sbin/mount-
# Passwd
5. retrieve the linux root password (lilo/grub)
Three methods:
1. when the system enters the single-user status, directly use passwd root to change
2. install the CD boot system and run the linux rescue status to connect the original/partition as follows:
Cd/mnt
Mkdir hd
Mount-t auto/dev/hdaX (original/partition ID) hd
Cd hd
Chroot ./
Passwd root
This can be done.
3. take the local hard disk and mount it to other linux systems. the method is the same as the second one.
Rh8 medium
I. lilo
1. When lilo appears: enter linux single
Lilo: linux single
2. press enter to directly access the linux command line
3. # vi/etc/shadow
Delete the contents of the first line, that is, the content before "root" and "next", in the line starting with "root,
The first line is similar
Root ::......
Save
4. # restart reboot. the root password is blank.
II. grub
1. when the grub screen appears, use the up and down keys to select the one you usually start linux (do not select dos), and then press the e key
2. use the up and down keys again to select the one you usually start linux (similar to kernel/boot/vmlinuz-2.4.18-14 ro root = LABEL =/), and then press the e key
3. modify the command line you see and add single. The result is as follows:
Kernel/boot/vmlinuz-2.4.18-14 single ro root = LABEL =/
4. press enter to return, and then press the B key to start, you can directly enter the linux command line
5. # vi/etc/shadow
Delete the contents of the first line, that is, the content before "root" and "next", in the line starting with "root,
The first line is similar
Root ::......
Save
6. # restart reboot. the root password is blank.
6: HP-UX root password loss:
Press esc at startup to enter isl
After entering ISL:
Isl> bo pri
(Yes/no) y
Ipl> hpux-is
Ipl> vi/etc/passwd
Remove the root password.