LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
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
 
Old 07-20-2008, 06:04 PM   #2
pinniped
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, 06:29 PM   #3
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
otherwise tell the rental company to see if they can fix it for you
 
Old 07-21-2008, 06:49 PM   #4
FranDango
Member
 
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 06:09 AM.
 
  


Reply


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 04:04 AM
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 04:20 AM
passwd reset problem arguerin Linux - Security 2 08-09-2006 02:52 PM
passwd problem shoki_neu Linux - Software 0 05-28-2004 07:07 PM
problem with 'passwd' erikm103 Linux - Software 8 03-11-2003 01:49 AM


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

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