Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-20-2008, 06:18 PM   #1
LQ Newbie
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
problem after edited /etc/passwd

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

Old 07-20-2008, 07:04 PM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
If you can use 'sudo' or even 'su' as another user you may be able to fix it.
Old 07-20-2008, 07:29 PM   #3
Registered: Oct 2005
Distribution: Ubuntu 12.04 X86_64
Posts: 960

Rep: Reputation: 35
otherwise tell the rental company to see if they can fix it for you
Old 07-21-2008, 07:49 PM   #4
Registered: Jun 2008
Posts: 101

Rep: Reputation: 15
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

Last edited by FranDango; 09-20-2008 at 07:09 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/passwd File Problem sobia Linux - General 3 02-20-2007 05:04 AM
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 05:20 AM
passwd reset problem arguerin Linux - Security 2 08-09-2006 03:52 PM
passwd problem shoki_neu Linux - Software 0 05-28-2004 08:07 PM
problem with 'passwd' erikm103 Linux - Software 8 03-11-2003 02:49 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration