Solaris のシステム管理 (上級編)

ルートパスワードを忘れた場合の対処

ルートパスワードを忘れると、システムにログインできなくなります。その場合、次の手順を実行する必要があります。

ルートパスワードを忘れると、システムにログインできなくなります。その場合、次の手順を実行する必要があります。

この手順については、『Solaris のシステム管理 (基本編)』の第 12 章「Oracle Solaris システムのブート (手順)」に詳述されています。


注 –

GRUB ベースのブートは、今回のリリースでは、SPARC ベースのシステムには使用できません。


次の例では、SPARC システムおよび x86 システムでルートパスワードを忘れた場合の対処方法について説明します。


例 18–1 SPARC: ルートパスワードを忘れた場合の対処

次の例は、ルートパスワードを忘れた場合にネットワークからブートして回復する方法について説明します。この例では、ブートサーバーがすでに有効になっているものとします。システムのリブート後に、必ず新しいルートパスワードを適用してください。


(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


例 18–2 x86: ルートパスワードを忘れた場合に GRUB ベースのブートを実行する

この例では、ブートサーバーがすでに有効になっているものとします。システムのリブート後に、必ず新しいルートパスワードを適用してください。


GNU GRUB  version 0.95  (637K lower / 3144640K upper memory)
 +-------------------------------------------------------------------+
| be1
| be1 failsafe
| be3
| be3 failsafe
| be2
| be2 failfafe
  +------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.

Searching for installed OS instances...
	
	An out of sync boot archive was detected on /dev/dsk/c0t0d0s0.
	The boot archive is a cache of files used during boot and
	should be kept in sync to ensure proper system operation.
	
	Do you wish to automatically update this boot archive? [y,n,?] n
Searching for installed OS instances...

Multiple OS instances were found. To check and mount one of them
read-write under /a, select it from the following list. To not mount
any, select 'q'.

  1  pool10:13292304648356142148     ROOT/be10
  2  rpool:14465159259155950256      ROOT/be01

Please select a device to be mounted (q for none) [?,??,q]: 1
mounting /dev/dsk/c0t0d0s0 on /a
starting shell.
      .
      .
      .
# cd /a/etc
# vi shadow
(Remove root's encrypted password string)
# cd /
# umount /a
# reboot


例 18–3 x86: ルートパスワードを忘れた場合にシステムをブートする

Oracle Solaris 10: 次の例は、ルートパスワードを忘れた場合にネットワークからブートして回復する方法について説明します。この例では、ブートサーバーがすでに有効になっているものとします。システムのリブート後に、必ず新しいルートパスワードを適用してください。


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] <ENTER>     to boot with options            
or      i <ENTER>                              to enter boot interpreter       
or      <ENTER>                                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