LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
Posts: 169

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
Posts: 169

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: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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



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

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

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