# Major root login problem... need help



## eross1lf (Aug 7, 2009)

Hello all!!

This is my first post...
I am new to freeBsd (I bet you heard that a lot), so I need help

I recently added a new user, and manage somehow to damage the root user details.
these are the details when I finger root from another user:
[mobilfon@gw ~]$ finger root
Login: root                             Name: Charlie Root
Directory: /root                        Shell: btms

The btms is the new user I created, and charlie is the password for the new user. I have no idea what I have done to screw this up...
Also I can login with the new user details too.

I would greatly appreciate if you could guide me on how can I restore the root user without SSH. The only way I can get in with root is by sftp or by another user.

thanks in advance 
Laszlo


----------



## Alt (Aug 7, 2009)

You must boot from console in single-user mode, then change password/shell/etc with vipw or how you damaged it 

UPD: pw usermod root -s /bin/csh
I think this must help


----------



## eross1lf (Aug 7, 2009)

please tell me how can I boot from console in single-user mode and do I need username and password for doing that?


----------



## Alt (Aug 7, 2009)

No need, you got root without password. When loading threre is menu right after bios, there must be 'single-user mode'.


----------



## eross1lf (Aug 7, 2009)

ok, got it... but it seems that pw can not be run under single user mode
is there another way? 
thanks


----------



## Alt (Aug 7, 2009)

Huh? He says 'file not found' ?
Try
/usr/sbin/pw usermod root -s /bin/csh


----------



## eross1lf (Aug 7, 2009)

yes, but /usr/ is empty when I boot in single user mode


----------



## Alt (Aug 7, 2009)

Then
mount /usr/
/usr/sbin/pw usermod root -s /bin/csh


----------



## dennylin93 (Aug 7, 2009)

I usually use `# mount -a`; it mounts everything.


----------



## eross1lf (Aug 7, 2009)

thank you both it worked great. I used 

```
# mount -a
# /usr/sbin/pw usermod root -s /bin/csh
```

with mount # /usr/ did not worked
thank you again for help. This saved me a lot of keyboard chewing.


----------

