irah has asked for the wisdom of the Perl Monks concerning the following question:
Greetings to Monks!,
I used few functions such as getlogin, getpwuid and in some other way including environment variable to get the currently logged in user name in Linux. Everything works when I execute the Perl script from Linux prompt.
When I call the same script from web programming language, it gives the user name as "www-data" since it Apache server running my program as www-data user.
I have to get the user name of the currently login user name instead of some other name. Is there any way to achieve this in Perl?.
Thanks in Advance!.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Get the currently logged in User name
by moritz (Cardinal) on Nov 05, 2011 at 11:03 UTC | |
Re: Get the currently logged in User name
by graff (Chancellor) on Nov 05, 2011 at 13:25 UTC | |
Re: Get the currently logged in User name
by aaron_baugher (Curate) on Nov 05, 2011 at 19:53 UTC | |
by Anonymous Monk on Nov 05, 2011 at 21:00 UTC | |
Re: Get the currently logged in User name
by doug (Pilgrim) on Nov 06, 2011 at 03:40 UTC |