in reply to Re: Passing Password through Perl Script
in thread Passing Password through Perl Script

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.
  • Comment on Re^2: Passing Password through Perl Script

Replies are listed 'Best First'.
Re^3: Passing Password through Perl Script
by Anonymous Monk on Aug 09, 2012 at 12:38 UTC
    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.

        Whomever has permission to read, and thus run your script... can read the password embedded in the file.

        If the user has the password anyways, why not just make it automatic?