LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-06-2010, 07:22 PM   #1
adloaiz
LQ Newbie
 
Registered: Oct 2010
Posts: 13

Rep: Reputation: 0
Broke root account ...


I deleted the root line in passwd and shadow and then tried to copy the backup and was able to put it all back to normal from rescue mode. However when i get to my login screen i can not login as root anymore or even after logged in as another user i can not su - or su root, it tells me that root user does not exist...... I am at a loss.... thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-06-2010, 08:55 PM   #2
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
best bet would be to backup your files and customized settings and do a fresh reinstall
 
Old 10-06-2010, 10:14 PM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Your thread title, "Need super duper help", is not very informative and will cut down the number of answers you receive. I suggest you read the sticky and the beginning of this forum and this article.
jdk
 
Old 10-07-2010, 03:03 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Welcome to LQ

Take a look at
http://www.cyberciti.biz/tips/recove...word-file.html

Kind regards
 
2 members found this post helpful.
Old 10-08-2010, 07:47 PM   #5
adloaiz
LQ Newbie
 
Registered: Oct 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Ok is there a way to boot from a rescue disk and mount the drive and force a new root? I edited the passwd and shadow file and I am still receiving root user does not exist. I can recover all other accounts no problem I really need root.
 
Old 10-08-2010, 07:49 PM   #6
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Rep: Reputation: 17
of course its possible what os is it ubuntu because all you ahve to do is mount your drives and i would think copy it over but course that in theory i have never tryed it
 
Old 10-08-2010, 07:55 PM   #7
adloaiz
LQ Newbie
 
Registered: Oct 2010
Posts: 13

Original Poster
Rep: Reputation: 0
redhat rel4
 
Old 10-08-2010, 08:01 PM   #8
animeman
Member
 
Registered: Dec 2009
Location: Bad Axe mi
Distribution: gentoo, Android, bohidI
Posts: 85

Rep: Reputation: 17
well then you probability could still boot into a live cd of it and copy the root over though if i'm not mistaken redhat costs money and they have a support team that should be able to help ya =]
 
Old 10-08-2010, 08:02 PM   #9
adloaiz
LQ Newbie
 
Registered: Oct 2010
Posts: 13

Original Poster
Rep: Reputation: 0
thanks I will try it out
 
Old 10-09-2010, 12:36 PM   #10
raviteja_s
Member
 
Registered: Jun 2010
Location: India
Distribution: Redhat
Posts: 68

Rep: Reputation: 1
go rescue mode

Last edited by raviteja_s; 12-21-2010 at 01:00 AM.
 
Old 10-09-2010, 03:47 PM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by raviteja_s View Post
INSTALL THIS PACKAGE !

setup-2.5.58-7.el5
Bad advice. First, the OP said it was RHEL4, not RHEL5. Second, how exactly do you expect to be able to install a package, when the OP said they couldn't log in as root???.

Please read the whole question and details, and post advice that can be helpful. This would only cause the OP to have MORE problems, even if it did work to start with.
 
Old 10-09-2010, 10:25 PM   #12
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
if you find the install disk you used to install onto that computer, there should be an option such as 'start a rescue shell' which boots into sh with automatic root priveleges, at which point you can say passwd which will change the root password or edit the passwd and shadow files as you please or perhaps use adduser. Whichever option you choose, you will have root priveleges.
 
1 members found this post helpful.
Old 10-14-2010, 08:23 PM   #13
adloaiz
LQ Newbie
 
Registered: Oct 2010
Posts: 13

Original Poster
Rep: Reputation: 0
ok fixed the root problem..... KIND OF.... I used a CD to get root to make changes to the /etc/passwd and /etc/shadow. I remove the CD and boot up normal and able to login as root and everything is fine but, if I restart the server again everything breaks again. So I made a fix that I don't want to keep in place. I fixed it by chmod 666 passwd and shadow and I can reboot all day long and everything works but for obvious reason I don't want the mod to stay 666 but I really don't know what is making the change?
 
Old 10-14-2010, 11:30 PM   #14
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
try chmod 600 and chown it as root
 
Old 10-15-2010, 01:50 AM   #15
fiku
LQ Newbie
 
Registered: Oct 2010
Posts: 25

Rep: Reputation: 2
paste in or just modify the permissions to satisfy these one:
You should have sth like:
Code:
-rw-r--r-- 1 root root 1179 2010-10-14 23:14 /etc/passwd
-rw-r----- 1 root shadow 1047 2010-10-14 23:14 /etc/shadow
 
  


Reply



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
how can i run a java program with root privilages from a non-root account? joyjjs Linux - Software 1 08-04-2009 12:14 AM
root account or user account arodlinux SUSE / openSUSE 3 12-23-2008 08:59 PM
Why is my common account can't open Terminal in XFCE4 but root account? notsay Slackware 4 08-18-2007 11:29 PM
Identifying non-administrators w/ root privilege/ Multiple root account in use wjeanpaul Linux - Security 4 05-19-2006 08:55 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:32 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
Open Source Consulting | Domain Registration