Find the answer to your Linux question:
Results 1 to 2 of 2
Hi. I've have been trying to make easy sudoer I (mike) run software called starting.pl where are one line: system("sudo -u pete /home/mike/application.pl"); So I want to change to user ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    13

    How to use sudoer ? FC5


    Hi.

    I've have been trying to make easy sudoer

    I (mike) run software called starting.pl where are one line:

    system("sudo -u pete /home/mike/application.pl");

    So I want to change to user pete and run the application which locates in my folder.

    And here are sudoers file:

    mike trinity= (pete) NOPASSWD: /home/mike/application.pl

    So here I let user mike to change to user pete (WITH NO PASSWORD QUESTION) and then I let him to run application which is in my folder.

    Why this wont work ?

    When I run this application called starting.pl system always ask me to write the password ?
    Why it ask met to write password? In my sudoer file I told to not ask the password ?

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    GIven your user is called "pete", then you should have a line like that (for this no password thing to work):
    Code:
    pete        ALL=(ALL)       NOPASSWD: ALL
    in /etc/sudoers
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •