LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 12-03-2004, 05:09 AM   #1
wiskic10_4
LQ Newbie
 
Registered: Oct 2004
Location: Odessa, TX
Distribution: Slackware 10.0, Debian 3.0, FC2, and various Live CD's
Posts: 20

Rep: Reputation: 0
Locked out of SU...


Hey guys,

Well, I don't consider myself much of a "noob," but this is the only place this question seems fit... I've locked myself out of "su"...

Earlier everything worked fine - I was "su"ing in and out with my normal account, installing some basic programs.

I noticed it right as I was installing SNORT. I needed to go "su", but I just kept getting a "Sorry" message. I can logout and log back in as root just fine, so I know I haven't forgot my password.

The only thing of significance I recall changing is are the rwx rights in certain directories. I executed a "chmod 755" for all files in /bin, /usr/bin, /usr/sbin, /etc, and /usr/etc. However, I've tried switching rights back around, but nothing seems to do the trick... most peculiar...

Anyway, any help would be greatly appreciated... I'm about fed up (I locked myself out of one of my servers yesterday by changing a home directory... sheesh...)

BTW, I'm running Slackware 10.0

Thanks,
Wiski
 
Old 12-03-2004, 06:02 AM   #2
jax8
Member
 
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
What are the current permissions on the su command

run command

ls -l /bin/su

Make sure that you have execute rights it should look something like this

-rwsr-xr-x 1 root root 95957 Mar 4 2004 /bin/su
 
Old 12-03-2004, 06:07 AM   #3
wiskic10_4
LQ Newbie
 
Registered: Oct 2004
Location: Odessa, TX
Distribution: Slackware 10.0, Debian 3.0, FC2, and various Live CD's
Posts: 20

Original Poster
Rep: Reputation: 0
jax8,

dean_j20@deanMachine001:~$ ls -l /bin/su
-rwxr-xr-x 1 root bin 35780 2004-06-21 14:20 /bin/su*
dean_j20@deanMachine001:~$


I've got the "x"... mysterious, isn't it?

-Wiski
 
Old 12-03-2004, 06:26 AM   #4
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
hi,
nothing mysterious considering u have put 755 for /bin directory.

Also i think /etc/sudoers must not be world readable.
 
Old 12-03-2004, 06:39 AM   #5
wiskic10_4
LQ Newbie
 
Registered: Oct 2004
Location: Odessa, TX
Distribution: Slackware 10.0, Debian 3.0, FC2, and various Live CD's
Posts: 20

Original Poster
Rep: Reputation: 0
hk_linux,

Actually, I meant the whole thing was mysterious, not the fact that su was executable...

Well, I logged back in as root, and set /etc/sudoers to 751 (so that it was no longer world-readable), but it didn't do the trick...

Thanks for your help, though

-Wiski
 
Old 12-03-2004, 11:55 AM   #6
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
When you set the 755 permissions you removed the SUID permission from su, you can restore it with chmod 4755 /bin/su. But you've done the same to a number of executables, all of which need to be SUID to work properly (eg does passwd work ?). You should compare the directory listings to another Linux system to see how the permissions should be. Or restore from backup if you have one.
 
Old 12-03-2004, 07:49 PM   #7
wiskic10_4
LQ Newbie
 
Registered: Oct 2004
Location: Odessa, TX
Distribution: Slackware 10.0, Debian 3.0, FC2, and various Live CD's
Posts: 20

Original Poster
Rep: Reputation: 0
Your reply is much appreciated, LasseW,

But let me ask a stupid question - what would be the harm in simply changing everything in the directory to 4755? Essentially I'm only adding SUID to functions that didn't have it before, right? I'm pretty certain 755 is the setting I want for most of my main system directories, so what does it hurt to add SUID?

I'll read up on it... the more I think I know, the more I realize there is to learn... thanks again...

-Wiski
 
  


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
locked out kwickcut Mandriva 6 11-14-2005 11:09 PM
Locked out of RH 9 carmoda Linux - Security 3 12-16-2003 10:44 AM
Locked out downinthemine Mandriva 1 10-28-2003 05:00 PM
Locked out captain_bogus Linux - Newbie 11 08-11-2003 05:32 PM
locked out of X VioLaToR Linux - Newbie 15 11-12-2002 05:36 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration