Solaris system root password forgotten or lost remedies

xiaoxiao2021-03-06  64

In the work we can occasionally encounter the root password forgotten or lost, which is unable to enter the Solaris system, then this time isn't it really rescued? The answer is of course negative, can be remedied by the following method: 1. First put the Solaris CD into the CDROM2. Press the Ctrl Break button to enter the OK State 3. When the OK word appears, type boot cdrom -s start to single user status 4 .mount / dev / dsk / c0t0d0s0 / a (C0T0D0S0 is a / disk, putting the / disk mount to a directory, the A directory is the MOUNT point provided by the system default) 5.cp / a / etc / shadow / a / etc / Shadow.bak (make a backup of shadow file file) CP / A / etc / passwd /A/etc/passwd.bak (back up the passwd file) 6.vi / a / etc / shadow then remove the root's encrypted password (Or delete the x behind the / A / etc / passwd in the Root username, such as the root: x: 0: 1: super-user: /: / bin / ksh of this file can be changed to root :: 0: 1: Super-user: /: / bin / ksh) 7. After restarting the Solaris system, you can log in with a non-passable root user, then change your root password immediately. System Failure and Recovery Method Operating System Unable to start: 1. Operating system important files are accidentally deleted. 2. Hard disk fault 3. It is faulty when reloading or upgrading the system. 4. system breakdown. 5. The system is attacked and the operating system is destroyed. 6. natural disaster.

Handling: Restore root file system at this time, the recovery steps are as follows: 1. Insert the Solaris 8 Software CD 1 of 2, enter the following command, set the system to CD boot, enter the single user mode: OK> boot cdrom -s2. Format / DEV / RDSK / C0T0D0S0 partition: # newfs / dev / rdsk / c0t0d0s03. Load the file system to an empty installation directory / A and enter the directory: # mount / dev / dsk / c0t0d0s0 / a # CD / A4. Restore root file systems from backup tapes: # ufsrestore RF / DEV / RMT / 05. Delete the restoreSymTable file: # rm restoreSymTable6. Installation boot block: # cd / usr / placeform / "uname -m" / lib / fs / ufs # installboot bootblk / dev / rdsk / c0t0d0s07. Uninstall the new file system: # CD / # umount / a8. Use the fsck command to check the recovered file system: # fsck / dev / rdsk / c0t0d0s09. Restart system: # init 610. Fully backup to the root partition: # ufsdump 0uf / dev / rmt / 0 / dev / rdsk / c0t0d0s0

转载请注明原文地址:https://www.9cbs.com/read-113050.html

New Post(0)