LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-28-2011, 05:33 PM   #1
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 639

Rep: Reputation: 30
Question Forcing sudo instead of su


To my knowledge, most Linux distros use "su" instead of "sudo". Is it possible to force an "su" using distro use "sudo" instead?

In other words, is it possible to force an "su" using distro like Debian, MEPIS, PCLOS, etc use "sudo" to behave like Ubuntu?

Or must I use Ubuntu if I want "sudo" behavior?

If I could "force" sudo, then could doing so cause any undesired effects?

Thank you.
 
Old 04-28-2011, 05:38 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
If shell users do not have the passwords of other shell users (or root), then they can't use su(1) to become them - period. And/or: several Linux distros have some useful PAM magic where you can require group membership (typically the 'wheel' group) to use su(1). Either option will do the trick.

You want to use sudo(8)? Then do it. Just make the appropriate users full sudoers, and bear in mind that doing so gives them rootly powers.
 
Old 04-29-2011, 03:30 PM   #3
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 639

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by anomie View Post
If shell users do not have the passwords of other shell users (or root), then they can't use su(1) to become them - period. And/or: several Linux distros have some useful PAM magic where you can require group membership (typically the 'wheel' group) to use su(1). Either option will do the trick.

You want to use sudo(8)? Then do it. Just make the appropriate users full sudoers, and bear in mind that doing so gives them rootly powers.

Sorry, what is "PAM"?
 
Old 04-29-2011, 05:49 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Read the pam(7) manpages for more information on that (and for details on further documentation). From a terminal:
Code:
$ man 7 pam
More specifically, I was referring to a tweak to the /etc/pam.d/su file:
Code:
# Uncomment this to force users to be a member of group root
# before they can use `su'. You can also add "group=foo"
# to the end of this line if you want to use a group other
# than the default "root" (but this may have side effect of
# denying "root" user, unless she's a member of "foo" or explicitly
# permitted earlier by e.g. "sufficient pam_rootok.so").
# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
# auth       required   pam_wheel.so
(My notes above apply to a Debian 6 system; they may or may not precisely match the systems you're tinkering with.)

Last edited by anomie; 04-29-2011 at 05:51 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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
forcing password authentication in sudo sulekha Ubuntu 1 11-24-2008 01:39 AM
forcing traffic through certain route(forcing source ip) taltman Linux - Networking 1 12-26-2007 01:07 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM


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