Re: Windows authentication without a password

[email protected] (Lawrence Statton) Wed, 24 Oct 2012 15:52:33 -0500
Newsgroups perl.libwww
Message-ID <[email protected]>
On 10/24/2012 09:21 AM, [email protected] 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