Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 10-06-2004, 02:58 AM   #1
LQ Newbie
Registered: Sep 2004
Posts: 27

Rep: Reputation: 15

thats my sudoers file, now, it seems that this allows my user (omry) to perform any action authout beeing authenticated at all, which is less secure that I would like.
looking at the man page for sudoers, it looks as if it should not be the case (should authenticate).
what am I missing?

# User privilege specification
root ALL=(ALL) ALL
omry ALL=ALL
Old 10-06-2004, 03:28 AM   #2
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
You don't want your user (omry) to be able to do everything root can do (what's the point in having a root then?). That is not secure at all, though omry has to enter his/her password first. Instead you want to add the commands that omry should be able to perform, such as:

omry ALL= /sbin/ifconfig, /sbin/ifup, /sbin/ifdown

(To let the user manage your network connection.)

Old 10-06-2004, 03:38 AM   #3
LQ Newbie
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
actually, I do want omry to be able to perform anything root can, but with root password authentication.
the reason is that sometimes I want to run commands as root, but with omry's environment variables.
its just like su-int into root, only shorter.
Old 10-06-2004, 04:10 AM   #4
Dead Parrot
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
The "su" command has options "-m" and "-p" (don't ask me why there's two different options that have the same function) that preserve user's environment. If you know that you ALWAYS want to keep user's environment when you "su" to root, you can set an alias (in ~/.bash_profile for login shell and in ~/.bashrc for non-login shells), so that "su" always means "su -m" (or "su -p"). Check "man su" for more info.
Old 10-06-2004, 10:01 AM   #5
LQ Newbie
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
just did the suicidal:
sudo apt-get remove sudo

than added these to my .bashrc
alias su='su -m'
alias sudo='su -c'

thats a bit safer. (always asks the admin password)



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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM
su and sudo muman Linux - Security 9 12-30-2004 11:55 AM
sudo pk21 Linux - Newbie 7 10-07-2003 08:53 AM
need help with sudo mla Linux - Software 4 10-02-2003 12:05 PM
sudo? nabil Linux - Security 1 02-12-2001 02:18 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration