in reply to Passing Password through Perl Script

This is covered in PerlFAQ 8 how do I ask the user for a password. If this does not cover what you mean please add more detail to your question.

  • Comment on Re: Passing Password through Perl Script

Replies are listed 'Best First'.
Re^2: Passing Password through Perl Script
by Amarendu (Initiate) on Aug 09, 2012 at 11:00 UTC
    I don't exactly need that you have specified. I don't want to prompt the user for a password. In my local system I run say two commands like "su hduser" which prompts me for a password and entering the password I get logged in as hduser. I just need to automate this thing using a script in my local system only so that I don't have to do this from the command line. Thanks in advance any help would be of great help.
      You can always configure /etc/sudoers to not require passwords -- either for all commands or for a list of specified commands.
        No, i really need the password , for security reasons. Is there any other alternative way, so that i could do the task.