How to restore a lost root password...

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Oct 25 08:05:13 PDT 2008


Matthew Seaman wrote:
> Matthew Seaman wrote:
>> DSA - JCR wrote:
>>> Hi all
>>>
>>> I have lost the neuron where I stored the root password of an 
>>> installation ;D
>>>
>>> I have seen a "How to" about this but I have a problem, i set the 
>>> console
>>> to insecure, so when I try to do the step of the "how to" i get a 
>>> message
>>> to input the root password or Ctrl-D to enter in multiuser mode.
>>>
>>> Is there a way to restore/modify it, or not?
>>>
>>> Some ideas?
>>
>> You can try booting from installation media into 'fixit' mode or live
>> filesystem.  Once there, you can mount your HDD read-write; edit 
>> /etc/master.password to remove the crypted password string from the
>> line for the root account; run 'cap_mkdb ./master.passwd'; reboot back
> 
> Ooops. Make that:  'pwd_mkdb ./master.passwd'
> 

Double ooops. make that: 'pwd_mkdb -d . ./master.passwd'

>> to your normal system and then log in as root (no password) and 
>> /immediately/ set another root password.
>>
>> This time, don't forget your root password.  If you struggle to memorise
>> it, then *write it down* on its own, on a blank sheet of paper.  Don't 
>> add any really obvious text like "this is the root password for my 
>> server" -- after all, we don't want to make it too easy for anyone 
>> trying to break in do we?  Seal that paper in an envelope and keep it 
>> in a safe place.  But not so safe that you forget where you put it...
>>
>>     Cheers,
>>
>>     Matthew
>>
> 
>     Matthew
> 

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20081025/900d0b9a/signature.pgp


More information about the freebsd-questions mailing list