Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i am running a CentOS 6.3 x64 OS on a VPS server, the server was having issues logging in to SSH using root credentials, it showed a message similar to "No Shell Exists, Access Denied" root login via console is also not working, however a normal wheel user can login.

So i had to boot the virtual machine into recovery for troubleshooting, however when i make any change and reboot the server the changes are not preserved.

I have already tried mounting the file system as read-write using following commands:

mount -a -o rw
mount -o remount, rw /

but this doesn't seem to work.

i am trying to add a new user and after mount the filesystem as read-write, i run the following commands

adduser username
passwd username
visudo

the changes are shown until i restart the system into normal mode, can anyone guide me how can i add a new root user from centos recovery mode or how to retain the changes made in recovery mode?

The VPS is hosted by FDC Servers using OnApp http://onapp.com i believe they have their own recovery console as i am unable to find its name.

Thank You

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It sounds like you are booting into Rescue mode. According to https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html, the default root partition is a temporary root partition. The documentation says to run chroot /mnt/sysimage to fix this issue.

share|improve this answer
    
thanks i didn't notice, that my main partition was not mounting at all. used mount /dev/xvda1 /mnt to access it. –  Zain Baloch Dec 31 '13 at 4:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.