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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-06-2005, 02:54 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3
Rep:
|
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?
|
|
|
|
04-06-2005, 03:20 PM
|
#2
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,479
Rep: 
|
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.
|
|
|
|
04-06-2005, 04:16 PM
|
#3
|
|
LQ Newbie
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
|
04-06-2005, 04:50 PM
|
#4
|
|
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:
|
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.
|
|
|
|
04-06-2005, 05:20 PM
|
#5
|
|
LQ Newbie
Registered: Oct 2003
Location: Atlantis
Distribution: Fedora Core 3
Posts: 3
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:29 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|