Trilight Zone Forum Index Trilight Zone
Privacy & Anonymity is our speciality !
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Restoring a lost root password

 
Post new topic   Reply to topic    Trilight Zone Forum Index -> Other Unix
Author Message
thedark
Second Lieutenant


Joined: 30 Jul 2005
Posts: 1074

PostPosted: Thu Aug 04, 2005 11:18 am    Post subject: Restoring a lost root password Reply with quote

For some reason you have forgotten your root password
After you stopped banging your head against the wall, this is how you can fix it:

When the bootstrap sais something like:

Hit [ENTER} to boot immediately, or any other key for command prompt.
Booting [kernel] in 8 seconds.....

hit a key, just pick one EXCEPT the ENTER key. You'll get a prompt like:

disk1s1a:>

Type the following commands:

disk1s1a:>unload all
disk1s1a:>load kernel
disk1s1a:>boot -s

The boot process will now start, just let it go until it asks you for a shell. Just hit
ENTER and 'sh' will be used as shell (which is a good thing). If you type 'mount' you'll
see that only your root partition is mounted, you'll have to mount your 'usr' partition so
you can use the 'passwd' command. Type something like this:

host#mount /dev/ad0s1f /usr

Check if the mount was successfull with the 'mount' command. If you have looked at the
mount output gave you, you proballey have seen that your root partition was mounted
read-only. You must change this with the command:

host#mount -u /

The root partition should now be mounted read-write. Now you can use 'passwd' program to
change the root password.

Man mount

-u The -u flag indicates that the status of an already mounted file
system should be changed. Any of the options discussed above
(the -o option) may be changed; also a file system can be changed
from read-only to read-write or vice versa. An attempt to change
from read-write to read-only will fail if any files on the
filesystem are currently open for writing unless the -f flag is
also specified. The set of options is determined by applying the
options specified in the argument to -o and finally applying the
-r or -w option.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Trilight Zone Forum Index -> Other Unix All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group