in reply to Passing Password through Perl Script

Amarendu,

What is the question?

Do you need to encrypt the password?

Do you need to save it in a safe place, etc??

Thank you

"Well done is better than well said." - Benjamin Franklin

  • 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 10:08 UTC
    I have a user named "hduser" and the password of the user is say "xyz123". Now I need a automated script for it so that I can get logged in as hduser without prompting for it's password. For example I have written a perl script as follows: #!/usr/bin/perl system ("su hduser && <xyz123>"); I need to set the user password for hduser. Please help urgently. Thanks a lot in advance.

      If you want your script to run with the privileges of user "hduser" without having to enter that user's password you should probably investigate Secure Shell.

      Cheers,

      JohnGG

        That, or root privileges. (su asks no password if started as root.) But ssh is a good idea, and so would be a properly configured sudo.