On Jul 15, 12:32 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
> [EMAIL PROTECTED] wrote:
> > On Jul 11, 11:59 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> >> Amit Saxena wrote:
>
> >>> On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> >>>> [EMAIL PROTECTED] wrote:
> >>>>> Can you please advice me how to get the Clients' windows logon user
> >>>>> name in perl?
> >>>>   $ENV{USERNAME}
> >>> Using environment variables to find username are risky !
> >>> Is there any API available for the same?
> >> (Please bottom post your replies to this group. Thanks.)
>
> >> use Win32;
>
> >> my $user = Win32::LoginName;
>
> >> Rob
>
> > Hi Rob,
>
> > It show "SYSTEM" when I user my $user = Win32::LoginName;, I logon my
> > windows with user name, but it show "SYSTEM" instead of my window user
> > name.
>
> > When I try user $ENV{USERNAME}, it show null.
>
> > Please advice.
>
> How is this Perl programming being run? It looks like it's a CGI program or
> being run from a scheduler, in which case the process doesn't belong to any
> individual user.
>
> What are you trying to achieve by establishing the user name?
>
> Rob- Hide quoted text -
>
> - Show quoted text -

Hi Rob,

Maybe there is another way of doing this, the purpose I try to achieve
is when windows users logon to their windows with user name and
password, then they able to access my perl program. This mean that a
list of authorized windows user name is store in database, so if the
windows user name match with the user name in database, then my perl
cgi program will auto login the user.

Really hope you can help me on this.

Thanks & Regards,
Leo.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to