LinuxQuestions.org
Visit Jeremy's Blog.
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 11-08-2005, 05:49 PM   #1
usauom
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
Unhappy goofed big time; need help recovering


I some how managed to revoke all privs from root when I was trying to do something else (chmod isn't that easy to pick up or at least to me it isn't).

I put in disk1 and rebooted the server. Thru the linux rescue I got to a shell and put in the command: chmod -R 777 / hoping to undo the damage. This seemed to work as root now has as high a priv as is allowed for everything under root.

The shell now exits and I get the kernel panic message when it tries to complete the reboot.

Placing the linux RH 3.0 AS disk1 back in again I can get it to boot off of /mnt/sysimage. I think I now want to change my root to this but I get permission denied as it tries to run sh (/usr/bin/sh --> bash).

The privs look ok.

Is this really what I want to do and what do I do to get around this problem?

Thanks in advance, you're help is life saver!!!

Mark

"May the penguin be with you."
 
Old 11-08-2005, 07:05 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Use RPM to restore permissions first

Before you continue I suggest restoring permissions using your database of installed rpm's and two lines of Bash script. If you can't chroot to that drive, just use rpm from the rescue CDR and add the rpm flags "--dbpath" and "--root" where dbpath is the directory where the rpm database resides and root is the root of the filesystem this should work on:
Code:
rpm -qa --dump|while read t; do t=( ${t} ); for i in 3 4; do case "${#t[$i]}" in 7)  
chmod ${t[$i]:3:4} ${t[0]}; chown ${t[5]}.${t[6]} ${t[0]};; esac; done; done
 
  


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
Recovering from time out when using Apt-get koyi Debian 3 04-02-2005 10:53 PM
Linux might hit the Big Time Phorem Linux - Enterprise 36 06-17-2004 03:37 AM
F...ed up big time neo77777 Slackware 6 12-01-2002 03:23 PM
I need help big time mscareall Linux - General 3 03-25-2002 08:30 PM
big BIG javascript & loading time luigi Programming 3 09-10-2001 04:53 AM


All times are GMT -5. The time now is 06:18 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