473,466 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

get client's login name using perl. Is this possible?

6 New Member
Hi All,


I am trying to get the login name of client's machine using Perl.
I was under impression that getlogin() will do the job. But this is not giving correct results.


Could anypne please help me in finding solution for the same.

Thanks in advance.

Cheers,
Vinay
Mar 27 '08 #1
2 7561
kalyanrajsista
7 New Member
It depends on which box you're working on now...windows or *nix.

The following code works perfectly on windows and unix.
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. # get logged-in user name
  4. print "Current user is " . getlogin();
  5.  
  6.  
This will work on Unix...

Expand|Select|Wrap|Line Numbers
  1. perl -le 'print scalar getpwuid $<'
  2.  
HTH,
Kalyan Raj
Mar 28 '08 #2
VinayKumarParakoti
6 New Member
Hi All,

Thanks for the response.

I have found out what the exact problem is.

As our friend said, and even I was trying, getlogin() is working perfectly.

The problem is like this:

We are using IIS server with anonymous login.
As you all know, the anonymous login will have a common login name IUSR_servername.

This is what even I am getting now when I try to retrieve the login name.

According to the restrcitions I have, I cannot change the settings in the server.
But I am able to get the ip address of the client machine.

Is there any possible way that I can get the login name of the client PC using ip address.

Thanks in advance for help.

Cheers,
Vinay
Mar 31 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Yannick Turgeon | last post by:
Hello all, 2-3 years ago, I did a program in perl. Now I have to modify it and I want to rewrite it from scratch using Python. The program is doing this: 1- Load Yahoo login webpage (https)...
0
by: Alvin A. Delagon | last post by:
Hello python programmers! I would like to add myself to the ever increasing number of python users. Here's my first question. I've written two SOAP clients using PERL and a PHP. I tried to wirte a...
3
by: NWx | last post by:
Hi, I have a ASP.NET application using forms authentication Default page is default.aspx, and login page is login.aspx As I perform authentication in Login page, I want to update a log table...
0
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to...
4
by: dschruth | last post by:
Hello. Can anybody solve this problem? I am using a server-side language (PERL) to *try* to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears...
1
by: bobano | last post by:
Hi everyone, I am writing a POP3 Client program in Perl. You connect to a POP3 Server and have a running conversation with the mail server using commands from the RFC 1939 Post Office Protocol....
10
by: subhadip | last post by:
Hi, I want to generate New mail alert for any mail client at client side . I want to check if any new mail has arrived in my inbox or not . the mail client be anything . I want to do this for...
0
by: sandy | last post by:
hello,,,,,,,,, i am creating login page using Perl/CGI facing prob... able to connect DB but from there facing prob If u have related code of login page in Perl please send me on...
4
by: Freedolen | last post by:
Hi All, I had a perl script which is used to login in a web page, but it gives the error as "301 Moved Permanently". What does this means and how can it be rectified? Can anyone help on this? ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.