On 10/24/2012 09:21 AM, samuel.feren...@barclays.com wrote:
Hi,

Is it possible to authenticate the user on Windows without entering the 
password?

I don't see where your script has anything to do with authenticating on windows -- you appear to be authenticating against a web server, which may HAPPEN to be running under windows, but that is invisible to you at the HTTP layer.

And the obvious answer is: No - if there were a way to authenticate without a password, there'd be no point in HAVING passwords.


Our script uses LWP and is talking to a webserver that requires authentication. 
The code is as follows:

# Perl code
my $ua = LWP::UserAgent->new(keep_alive =>  1);
$ua->credentials(URI->new($url)->host_port, '', $USER, $PASS ) if $USER and 
$PASS;
my $resp = $ua->request( GET $url );


So - their advice is good - you need to keep a local copy of the credentials (e.g. username and password) in some "sufficiently secure" way.

Depending on your security/paranoia profile, this could be as simple as a chmod 400 dot-file, or as complex as you want it to be.

--Lawrence

Reply via email to