Solaris10忘記root密碼後處理方法
在VMware X86 環境下測試光碟引導方式刪除root密碼!
【參考】
What to Do if You Forgot Root Password
If you forget the root password and you cannot log into the system, you will have to do the following:
· Stop the system by using the keyboard stop sequence.
· Solaris Express 6/05: On x86 based systems, boot the system in the Solaris failsafe archive.
· Solaris 10: Boot the system from a boot server or an install server, or from a local CD-ROM.
· Mount the root (/
) file system.
· Remove the root password from the /etc/shadow
file.
· Reboot the system.
· Log in and set root's password.
These procedures are fully described in Booting a SPARC Based System in System Administration Guide: Basic Administration , Booting a System in the GRUB Based Boot Environment in System Administration Guide: Basic Administration , and Booting an x86 Based System in System Administration Guide: Basic Administration .
Note
GRUB based booting is not available on SPARC based systems in this Solaris release.
The following examples describe how to recover from a forgotten root password on both SPARC and x86 based systems.
[@more@]Example 25.1. What to Do if You Forgot Root Password
The following example shows how to recover when you forget the root password by booting from the network. This example assumes that the boot server is already available. Be sure to apply a new root password after the system has rebooted.
(Use keyboard abort sequence--Press Stop A keys to stop the system)
ok boot net -s
# mount /dev/dsk/c0t3d0s0 /a
# cd /a/etc
# TERM=vt100
# export TERM
# vi shadow
(Remove root's encrypted password string)
# cd /
# umount /a
# init 6
Example 25.2. Performing a GRUB Based Boot When You Have Forgotten the Root Password
Solaris Express 6/05: This example assumes that the boot server is already available. Be sure to apply a new root password after the system has rebooted.
Press any key to reboot.
Resetting...
GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------------+
| Solaris 10.1 nv_14 X86 |
| Solaris failsafe |
| |
| |
| |
+-------------------------------------------------------------------------+
GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
+-------------------------------------------------------------------------+
| root (hd0,2,a) |
| kernel /boot/multiboot -B console=ttya kernel/unix -s |
| module /boot/x86.miniroot-safe |
| |
| |
| |
+-------------------------------------------------------------------------+
Booting command-list
root (hd0,2,a)
Filesystem type is ufs, partition type 0x000000bf
kernel /boot/multiboot -B console=ttya kernel/unix -s
[Multiboot-elf, <0x1000000:0x13f3b:0x3941d>, shtab=0x104e258, entry=0x100000
0]...
module /boot/x86.miniroot-safe
SunOS Release 5.10.1 Version snv_14 32-bit
Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Booting to milestone "milestone/single-user:default".
Configuring devices.
Searching for installed OS...
/dev/dsk/c1t0d0s0 -- Solaris 10.1 nv_14 X86Do you wish to automatically update boot archives? [y,n,?]n
#
mount /dev/dsk/c0t0d0s0 /a
..
.
#
cd /a/etc
#
vi shadow
(Remove root's encrypted password string)
#
cd /
#
umount /a
#
init 6
Example 25.3. Booting a System When You Have Forgotten the Root Password
Solaris 10: The following example shows how to recover when you forget root's password by booting from the network. This example assumes that the boot server is already available. Be sure to apply a new root password after the system has rebooted.
Press any key to reboot.
Resetting...
.
.
.
Initializing system
Please wait...
<<< Current Boot Parameters >>>
Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
Boot args:
Type b [file-name] [boot-flags] to boot with options
or i to enter boot interpreter
or to boot with defaults
<<< timeout in 5 seconds >>>
Select (b)oot or (i)nterpreter:
b -s
SunOS Release 5.10 Version amd64-gate-2004-09-30 32-bit
Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
DEBUG enabled
Booting to milestone "milestone/single-user:default".
Hostname: venus
NIS domain name is example.com
Requesting System Maintenance Mode
SINGLE USER MODE
Root password for system maintenance (control-d to bypass):
xxxxxx
Entering System Maintenance Mode
.
.
.
#
mount /dev/dsk/c0t0d0s0 /a
.
.
.
#
cd /a/etc
#
vi shadow
(Remove root's encrypted password string)
#
cd /
#
umount /a
#
init 6
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/60144/viewspace-1023573/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS7忘記mysql的root密碼_處理方法.CentOSMySql密碼
- 【問題處理】MySQL忘記root密碼的處理辦法MySql密碼
- mysql 8.0忘記root使用者密碼處理MySql密碼
- LINUX忘記ROOT使用者密碼處理方法(linux單使用者模式)Linux密碼模式
- mysql 5.7忘記root密碼MySql密碼
- 07 . Jenkins忘記root密碼Jenkins密碼
- 帝國cms後臺admin帳號密碼忘記的處理方法密碼
- Linux忘記root密碼解鎖Linux密碼
- mysql誤刪root使用者或者忘記root密碼解決方法MySql密碼
- MySQL8.0 忘記 root 密碼下如何修改密碼MySql密碼
- Oceanbase忘記OCP訪問密碼處理方案密碼
- Linux伺服器---mysql忘記root密碼Linux伺服器MySql密碼
- 【轉載】Linux忘記root密碼--進入單使用者模式修改root密碼Linux密碼模式
- MetInfo 後臺忘記密碼的解決方法密碼
- PHPCMS 後臺密碼忘記的解決方法PHP密碼
- 忘記 EyouCMS 後臺密碼的解決方法密碼
- MySql5.5忘記root密碼怎麼辦MySql密碼
- win10 mysql8.0.12 忘記root密碼如何重置密碼Win10MySql密碼
- centos7 修改root密碼 密碼忘記的情況下CentOS密碼
- PbootCMS忘記密碼後的重置密碼流程boot密碼
- linux系統root密碼忘記了怎麼辦Linux密碼
- Linux遺忘root密碼的其中兩種解決方法Linux密碼
- mysql 4.1.7忘記資料庫密碼的處理辦法MySql資料庫密碼
- Linux忘記root祕密怎麼辦Linux
- MySQL 8.0.15忘記密碼重置方法MySql密碼
- DedeCMS後臺管理員密碼忘記的解決方法密碼
- 忘記帝國CMS後臺密碼的解決方法密碼
- PbootCMS 網站後臺密碼忘記的解決方法boot網站密碼
- 織夢CMS 後臺密碼忘記的解決方法密碼
- MySQL密碼忘記後怎麼辦?MySql密碼
- 使用易優CMS忘記後臺密碼的解決方法密碼
- Mysql忘記密碼解決方法凹MySql密碼
- PbootCMS忘記登入密碼怎麼辦?忘記了PBootCMS後臺的登入密碼boot密碼
- PbootCMS後臺登陸密碼忘記/找回密碼後臺登入密碼外掛boot密碼
- 忘記eyoucms後臺密碼怎麼辦?密碼
- ZBlog後臺密碼忘記該如何找回密碼
- mysql 忘記密碼MySql密碼
- Linux 忘記密碼Linux密碼
- MySQL忘記密碼MySql密碼