LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I accidently chowned / now how to fix? (https://www.linuxquestions.org/questions/linux-newbie-8/i-accidently-chowned-now-how-to-fix-733399/)

linus72 06-16-2009 12:49 PM

I accidently chowned / now how to fix?
 
er...that was dumb huh?
now, if I try to use sudo su
it says "must be setuid root"
and when I try that it says
not currently installed, install by using
sudo apt-get super
and when I do that it says
"must use setuid root"
damn it...
so, what can I do to fix it?
thanks
Oh, I used "chown -R bz /"

repo 06-16-2009 12:55 PM

you could try to use a live cd, and chown back to root
But to put all files back to the original state....

linus72 06-16-2009 12:59 PM

what f*** up huh?!
how would I chown back to root Repo?
if it doesn't work i will have to reinstall?

repo 06-16-2009 01:01 PM

Become root on the live cd, mount the drive and chown back to root.
However, I would suggest to reinstall.

linus72 06-16-2009 01:11 PM

ahhh...that sucks!
so it would be "chown -R root /mnt/hda5"?
on livecd
this is ubuntu-8.04 is what i messed up..

GazL 06-16-2009 01:34 PM

It won't help you fix it now, but we had an interesting discussion on backing up permissions a while ago which you may find useful.

catkin 06-16-2009 01:41 PM

Hello linus72 :)

First make up your mind never to do it again :eek: (that's a quote from a 1930s car maintenance manual.

Sorry -- re-installation (or restoring from backup) are your only options.

Best

Charles

linus72 06-16-2009 02:49 PM

mmmm.thanks gang.
Now, how do I restore from backup?
You mean use the ubuntu restore entry at boot?
I did not mean to chown /, I was goin to do chown -R bz /media/usb0
cept I hit / and then enter!
by then it was too late....

Now, is there a failsafe to prevent this should I or someone else
do this again?
a way where it asks you if that's Really what you wanna do?

chrism01 06-16-2009 11:11 PM

Doesn't look like there's -i option( see man rm), so rename to mychown and put a simple shell script in its place that does that, then calls the real one.


All times are GMT -5. The time now is 05:32 PM.