way to get username & domainname?

Takafumi Kasagi kasagit at alpha.co.jp
Thu Aug 25 21:43:53 EDT 2005


hi,Achim

> > So I have tried following ways.
> > 1,using environment variable by perl
> > e.g. REMOTE_USER REMOTE_IDENT AUTH_USER LOGON_USER
> > These variables were empty.
>

Achim Grolms <achim at grolmsnet.de> wrote: 

> In Perl you can have a look at the keys of %ENV hash to find what you are 
> looking for.
> 
> Why don't you let Perl do the work for you and printout the Environment?

-----------from here-----------from here------------------
DOCUMENT_ROOT = /var/www/html
GATEWAY_INTERFACE = CGI/1.1
HTTP_ACCEPT = */*
HTTP_ACCEPT_ENCODING = gzip, deflate
HTTP_ACCEPT_LANGUAGE = ja
HTTP_CONNECTION = Keep-Alive
HTTP_HOST = server.hogehoge
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
PATH = /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
QUERY_STRING = 
REMOTE_ADDR = 192.168.0.52
REMOTE_HOST = client.hogehoge
REMOTE_PORT = 1364
REQUEST_METHOD = GET
REQUEST_URI = /cgi-bin/demo.pl
SCRIPT_FILENAME = /var/www/cgi-bin/demo.pl
SCRIPT_NAME = /cgi-bin/demo.pl
SERVER_ADDR = 192.168.0.100
SERVER_ADMIN = root at localhost
SERVER_NAME = server.hogehoge
SERVER_PORT = 80
SERVER_PROTOCOL = HTTP/1.1
SERVER_SIGNATURE = Apache/2.0.53 (Fedora) Server at server.hogehoge Port 80
SERVER_SOFTWARE = Apache/2.0.53 (Fedora)

added variables
REMOTE_USER = 
REMOTE_IDENT = 
AUTH_USER = 
USER_NAME = 
USER = 
LOGNAME = 
LOGON_USER =
-----------to here-----------to here------------------ 

I added 7 variables beacuse no variable in output by using "keys %ENV".
No information I want to know.

Any ways to get username & domainname from browser?

Please, no flames about my bad English.
Thanks!!




More information about the Kerberos mailing list