in reply to sudo not working

Is the code you've shown you whole program? If so, why bother Perl with system requests?

Is the unformatted list beginning "#User alias...." supposed to be the content of your "sudoers" file as implied by the narrative and, if so, why isn't it formatted in code tags as explicitly mentioned in the markup directions at the text box you used to create your question?

Why does this look like an attempt to upgrade unauthorized users/processes to perform (malicious?) actions with root's credentials? (It sure as hell doesn't look like a reasonable exercise for a Perl noob!)

Replies are listed 'Best First'.
Re^2: sudo not working
by Vishza (Initiate) on Jan 06, 2015 at 21:33 UTC

    Thanks, for the replies and pointing me in the direction of the issue.
    I am not trying to do any malicious work here but rather trying to perform health checks on a system for 2 different users, I was trying to avoid asking the user for both passwords. Thanks I have found another way of doing it.