1829331 Members
2637 Online
109989 Solutions
New Discussion

sudo

 
Cheung_2
Frequent Advisor

sudo

I would like to let the user "edp_usr" to run "ll"
as root, I have add the below line to file /etc/sudoers
" edp_usr gzip=/bin/ll" ,

then the user "edp_usr" try to run the below statement, the system ask to input the password, can suggest what is wrong in my setting? thx.
#whoami
edp_usr
# sudo ll /tmp
Password:
Andy
3 REPLIES 3
Tom Geudens
Honored Contributor

Re: sudo

Hi,
From my very own /opt/sudo/etc/sudoers/sudoers file :
# Host alias specification
User_Alias XPS = xpsb

# Default overrides
Defaults !syslog
Defaults logfile = /var/adm/syslog/sudo.log
Defaults:XPS !authenticate
... and so on ...

What you need for your user is the "!authenticate" parameter ...

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
dirk dierickx
Honored Contributor

Re: sudo

you could also try:

edp_usr gzip=NOPASSWD: /bin/ll
Trever Furnish
Regular Advisor

Re: sudo

You gave him permission to run /bin/ll, not "ll". The user needs to type /bin/ll.

Do *not* change your sudoers file to allow the user to run ll instead of /bin/ll - if you do then the user can write a script to do whatever he wants, name it ll, and run it as root.
Hockey PUX?