LinuxQuestions.org
Review your favorite Linux distribution.
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-17-2008, 08:27 PM   #1
bcwagne
Member
 
Registered: Feb 2008
Distribution: Debian Testing, OSX
Posts: 164

Rep: Reputation: 32
Keep all but the root user from running su


I don't want users to be able to run the 'su' command, but am not sure the best way to do this. I thought I might remove su from /bin to /sbin, but I don't know if that is a good thing to do or not.

I also thought I might set the permissions differently. I only want root to be able to run it.

Any suggestions?

Thanks.
 
Old 06-17-2008, 08:45 PM   #2
bcwagne
Member
 
Registered: Feb 2008
Distribution: Debian Testing, OSX
Posts: 164

Original Poster
Rep: Reputation: 32
Nevermind

Nevermind, I figured out the correct file permissions. That is better than moving to /sbin.
 
Old 06-17-2008, 08:46 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
For one thing, root would never need to run su (unless you really wanted root to act as another user) but yes, chmodding su to stricter permissions should do what you want. Change it to "RWX --- ---"

SVA

EDIT - I see you figured it out
 
Old 06-17-2008, 08:50 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
su'ing to a user is quite handy. If I su to root, I need to give a password. Rather than dropping back to myself to perform a user function, I'll su to myself (no password required) then exit back. Makes life simpler.
 
Old 06-17-2008, 10:20 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by billymayday View Post
su'ing to a user is quite handy. If I su to root, I need to give a password. Rather than dropping back to myself to perform a user function, I'll su to myself (no password required) then exit back. Makes life simpler.
That is a really interesting concept that I hadn't thought of. Thanks! It may come in handy to keep in mind.

SVA
 
  


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
Running samba as a user other than root Questor21 Linux - Software 6 04-09-2006 12:03 PM
Running Nmapfe as non-root user XaViaR Linux - General 3 06-10-2005 05:04 AM
Running user program from root kilativv Linux - Software 2 07-31-2004 12:49 AM
Help me get KDE running as a non root user vdogvictor Slackware 8 06-27-2004 08:27 PM
Running xcdroast as non-root user kermit Linux - Newbie 2 07-07-2002 05:36 PM


All times are GMT -5. The time now is 12:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration