CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Passing Password through Perl Script

 



Amarendu
New User

Aug 9, 2012, 3:33 AM

Post #1 of 2 (701 views)
Passing Password through Perl Script Can't Post

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.


FishMonger
Veteran / Moderator

Aug 9, 2012, 7:19 AM

Post #2 of 2 (692 views)
Re: [Amarendu] Passing Password through Perl Script [In reply to] Can't Post

It's unclear what you're needing to accomplish, but maybe what you need is to use the Sudo module.
http://search.cpan.org/~landman/Sudo-0.32/lib/Sudo.pm

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives