LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-06-2005, 02:54 PM   #1
Wujen
LQ Newbie
 
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3

Rep: Reputation: 0
Oops! I did a chown -R root from the '/' level


And consequently almost everything on the machine got owned by root, save for a few /dev's that wouldn't let me. I've got a decent amount of it back in working order but now only root can use the su command with any effectiveness. Any other account that tries to use su hesitates before receiving an error that the password is incorrect. The password is correct so I'm led to believe I've made some vital file in the authentication process inaccessible to anyone but root. I'm guessing it's one that should be owned by a system user rather than root, or maybe I need to re-SETUID root on one or all of the files involved. The problem is, I don't know all of the files involved... /usr/bin/su, /etc/passwd, /etc/shadow. Can anyone help? This is on a FC3 distribution with everything installed (if not all used).

Also, since this little accident my System Log has been getting spammed with...

pam_timestamp_check: pam_timestamp: `/' owner GID != 0

Any clues for this one?
 
Old 04-06-2005, 03:20 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The message is rather easy. GID is group id (owner group). Id 0 is root. So it complains that / is not owned by group root. Check it.
 
Old 04-06-2005, 04:16 PM   #3
Wujen
LQ Newbie
 
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Mara, that cleared the spam up. The GID was set to 'adm'. I left it alone after Googling the phrase and finding one guy's comment that it was supposed to be that way. So much for that.

Oh, I found another quirk. The locate command is spitting back access-denied problems about the /var/run/slocate.db file to the regular users. The UID is set to 'root' currently, and the GID is 'slocate'. Apparently there is no 'slocate' user, only a group. What user is the slocate.db supposed to be? Maybe this is a case for chmod 4640? (Well that didn't work)

Hmm... deleting the old database and updatedb'ing anew didn't fix it either. Must be inheriting some bad permissions?

Last edited by Wujen; 04-06-2005 at 04:47 PM.
 
Old 04-06-2005, 04:50 PM   #4
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Investigate the --setperms and --setugids options to RPM...

Something like:

for RPM in `rpm -qa`; do rpm --setperms $RPM; rpm --setgids $RPM; done

Edit: Fixed the loop. That's what happens when I post things without testing them

Last edited by sigsegv; 04-06-2005 at 05:54 PM.
 
Old 04-06-2005, 05:20 PM   #5
Wujen
LQ Newbie
 
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by sigsegv
Investigate the --setperms and --setugids options to RPM...

Something like:

for RPM in `rpm -qa`; do rpm --setperms --setgids ${RPM}; done
Thank you much sigsegv! That solved both problems above and gives me hope for ferreting out any other little things that pop up!

rpm --setperms slocate-2.7;rpm --setguids slocate-2.7 got me my locate command back
and
rpm --setperms coreutils-5.2.1-31.i386;rpm --setguids coreutils-5.2.1-31.i386 got me the su command back!

Nice little loop, btw. Using both --options at the same time gave me a bunch of 'chmod: invalid mode string' errors, so I broke it down into two loops. Thanks again!

Last edited by Wujen; 04-06-2005 at 05:31 PM.
 
  


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
proftpd chown as root failed john8675309 Linux - Software 2 12-06-2005 04:53 PM
python script needs root chown ability kosuke Programming 5 11-07-2004 04:14 PM
chown username -R / oops HELP! fireman949 Linux - Newbie 6 06-11-2004 08:36 PM
CHOWN as root fails; owner 4294967295? eventide Linux - Hardware 1 11-24-2003 12:42 AM
chmod vs chown on some root files and yes apps ergo_sum Linux - Newbie 3 11-12-2003 10:49 AM

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

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