LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-16-2009, 01:49 PM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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 /"
 
Old 06-16-2009, 01:55 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
you could try to use a live cd, and chown back to root
But to put all files back to the original state....
 
Old 06-16-2009, 01:59 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
what f*** up huh?!
how would I chown back to root Repo?
if it doesn't work i will have to reinstall?
 
Old 06-16-2009, 02:01 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Become root on the live cd, mount the drive and chown back to root.
However, I would suggest to reinstall.
 
Old 06-16-2009, 02:11 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
ahhh...that sucks!
so it would be "chown -R root /mnt/hda5"?
on livecd
this is ubuntu-8.04 is what i messed up..
 
Old 06-16-2009, 02:34 PM   #6
GazL
Senior Member
 
Registered: May 2008
Posts: 4,188
Blog Entries: 5

Rep: Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623Reputation: 1623
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.
 
Old 06-16-2009, 02:41 PM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Hello linus72

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

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

Best

Charles
 
Old 06-16-2009, 03:49 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
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?
 
Old 06-17-2009, 12:11 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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.
 
  


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
chowned password database, Novell SLED 10.1 allyanncah Linux - Newbie 3 11-04-2008 02:12 PM
stat.d run as root...should be chowned Old_Fogie Slackware 6 10-20-2006 12:52 PM
stat.d run as root...should be chowned Old_Fogie Slackware 1 10-10-2006 06:48 AM
Forbidden error when chmodded 777 and chowned apache Raybrandt Linux - Server 1 08-21-2006 09:38 PM


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