Help on root login.

I am on a vps server running 9.1-PRERELEASE, and I tried to upgrade to 9.1-RELEASE using svn, mergemaster corrupted my master.passwd and /etc/passwd so I have to recopy the master.passwd file from an old default copy. I believe that I have disabled root login from virtual console by changing the "secure" to "insecure" on /etc/ttys/ as a form of security and now I can't login as root. I used key-based authentication for my normal user and like I said, I have the fresh default copy of master.passwd so my users aren't there yet. Is there any other way so I can log-in as root on my virtual console?
 
Boot from a live CD or something like that. You can then change the tty back to insecure and restore the backup of master.passwd.
 
I'm on live CD now, I accessed /etc/ttys/ but they are all on "secure", I think it's the CD's own /etc/ttys/ how will I access my own servers ttys record?
 
Mount the server's root partition, typically on /mnt. For example,
Code:
# mount /dev/ada0p2 /mnt
# ee /mnt/etc/ttys
 
Thanks but how do I find where is my root partition? I'm on xen virtualization by the way. I'm getting
Code:
WARNING: R/W mount of / denied. Filesystem is not clean - run fsck
WARNING: Forced mount will invalidate journal contents
mount: ada0p2 : Operation not permitted
 
Got it now, I have successfully mounted /dev/ada0p2/ to /mnt, I have edited and manually added a new user to my root partition's /mnt/etc/master.passwd and /mnt/etc/passwd but is it possible to use pwd_mkdb from Live CD? I'm getting a Read Only File problem when I run pwd_mkdb so changing my root's password doesn't do a thing, I still can't get in to my server.

What I plan to do is enable PermitRootLogin and PermitEmptyPassword first so I can login as root before I redo necessary changes again.
 
Back
Top