[sudo-users] Configuring /etc/sudoers

Stephen Constantinou stephanos at writeme.com
Wed May 2 03:30:30 EDT 2007


Dear All

I am new to Linux and I am using Mandriva 2007.  There is so much new 
terminology and I am learning very slowly.  I mention this as I have 
joined a few forums but I find that documentation is written for 
experienced users and not new people like me.  I have even found that 
e-mail forums make replies that are far to advanced for me.  I have had 
to stop trying to configure a free anti virus programme for these 
reasons and go over to a commercial programme with technical support 
available via e-mail and telephone as a way of over coming this problem.

I wish to run two commands that have to be run as root, but as a user. 
I am trying to avoid having to enter a password/any password.

The commands are:
      /opt/kaspersky/kav4ws/bin/kav4ws-kavscanner
      /opt/kaspersky/kav4ws/bin/kav4ws-keepup2date
The user/group for these two files are "root"

I have read the html documentation at
     http://www.gratisoft.us/sudo/
and run the command visudo (as root) in order to open the
/etc/sudoers file.
I am sorry to say that I found this application impossible to use.  I 
did not exit cleanly because pressing q just deleted text and with no on 
screen prompts (except what does "Recording" mean) I just ended up 
killing the terminal window I was in and then deleting the hidden file 
after.  I did read the web page:
      http://www.gratisoft.us/sudo/man/visudo.html
but I could not relate this enough and start editing, exit without 
saving or even enter text (perhaps this is what recording is).

All this is just an unnecessary additional problem to the overall 
problem that I did not understand the help files on /etc/sudoers anyway.

I have attempted to show below what I should be adding to this file.  I 
have one user “stephanos” and I want to be able to type at the command 
line as that user the words "$ sudo scan" which will run as root the 
command "/opt/kaspersky/kav4ws/bin/kav4ws-kavscanner" but without having 
to enter a password/any password.

      User_Alias     scan = stephanos
      stephanos     ALL=    /opt/kaspersky/kav4ws/bin/kav4ws-kavscanner
      scan     stephanos = NOPASSWD: ALL

Now if this is wrong, and I am sure it is, please do not laugh as I have 
experienced much frustration just getting to this stage.  What is also 
not clear is where in the file the lines I wish to add should apprear.

Yours with much distress

Stephen Constantinou



More information about the sudo-users mailing list