The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Kuser removes root account
Author: Rhyous 
Date:   04-12-03 02:39

Hey all,

I run FreeBSD 5.1 with KDE 3.1.4.

I was just playing around seeing what gui tools came with and I found Kuser.

That is a problem. Kuser is bad...they need to fix it.

This is what happened:

Kuser deleted the first three lines from my /etc/master.passwd file and my /etc/passwd file.

Next thing I know I can't su to root because root doesn't exist.

Guess what else Kuser did?

It set the timeout on my user accounts to December 31, 1969 (or some date in the 1960s).

So I couldn't login at all.

Well Here is how to fix it.

1. Reboot the computer in Single User Mode (option 4 on boot menu)
2. Once booted you will be promted for your shell, just hit enter.
NOTE: Now in single user mode you only have read access
3. Get write access by typing in the following com mands:
mount -u /
mount -a
NOTE: That should give you write access. You should be logged in as toor.
4. copy your /var/backups/master.passwd.bak file to /etc/master.passwd and yes overwrite the old one.
5. Now just run the following command:
pwd_mkdb -p /etc/master.passwd

That should fix your root account!

Thanks,

Jared Barneck

Key words: recover root account - add root account - create root account - fix root account - root login - no such user root

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Kuser removes root account   new
Rhyous 04-12-03 02:39 
 Re: Kuser removes root account   new
Mike Crosland 21-01-04 13:34 
 Re: Kuser removes root account   new
rastavideo 25-07-04 17:12 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org