LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem after edited /etc/passwd (https://www.linuxquestions.org/questions/linux-newbie-8/problem-after-edited-etc-passwd-657044/)

diridam 07-20-2008 05:18 PM

problem after edited /etc/passwd
 
hi,
i have quite a big problem... if anyone can help me i will be deeply thankfull
I have a rented box to which i have only ssh access.
I have edited /etc/passwd with vim to change the home o a user, and i made this in a little bit of a hurry.
The problem is that i accidentally deleted the "r" from root:x:0:0:root:/root:/bin/bash and now i have only oot:x:0:0:root:/root:/bin/bash. Of course this doesn't make me able to login as root or su as root anymore.

I've tried to edit /etc/passwd through another account to ad that "r" , but no success.

Is there another way to put that "r" back ? i'm quite desperate as i have work to do and i'm stuck on this because of a mistake.
I underline that i don't have access to the server as it's a rental



thanks

pinniped 07-20-2008 06:04 PM

If you can use 'sudo' or even 'su' as another user you may be able to fix it.

dasy2k1 07-20-2008 06:29 PM

otherwise tell the rental company to see if they can fix it for you

FranDango 07-21-2008 06:49 PM

The only possibility would be if your root SSH session would still be active, but I assume that is not the case anymore.

This will be bitter. No way around. Call the system administrator for that computer who has physical access. He/she will have to reboot with a rescue disk and correct your mistake.

Never do root jobs when your in a hurry. It simply doesn't pay off.

Linux Archive


All times are GMT -5. The time now is 07:37 AM.