Retrieve the username which got authenticated by the apache


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Retrieve the username which got authenticated by the apache
# 1  
Old 07-08-2014
Retrieve the username which got authenticated by the apache

I have an apache 2.2 setup with LDAP auth enabled. The html form in the front end takes some values and processes them using perl script in the background. Is there a way I can get the username which is submitting the values in that perl script. I am planning to track who is doing what(with the values they submit) in a more better way in a file than the usual access_log.

I tried using the below in my perl script, but no luck. Any help would be much appreciated.

Code:
my $userId = $_SERVER['AUTHENTICATE_SAMACCOUNTNAME'];
print " I am $userId";

# 2  
Old 07-08-2014
Have you tried $_SESSION['userPrincipalName']
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Why does "ps -[u|U] username" not list processes when username is numeric?

Greetings, The title pretty much says it all. I've snooped everywhere and can't find anything on this. Since our organization went to numeric usernames, using the u|U option for ps returns no processes. Example passwd entry: 320074:DjZAJKXun8HBs:10129:6006:Joe Y:/cadhome/analysis/jy:/bin/bash... (4 Replies)
Discussion started by: crimso
4 Replies

2. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

3. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies

4. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

5. Ubuntu

Help Ubuntu saying i'm not authenticated

Please Help Ubuntu is playing up cant in install using the Ubuntu software center. keeps saying that i'm not authenticated. but I am the administrator and have sudo. Thanks josh (4 Replies)
Discussion started by: jtsmith90
4 Replies

6. Programming

Need a help in automating the http authenticated web page - via PHP scripting

Hi all, Need a help in PHP scripting. Am automating a process in web page. The process is 1. i have to open that web page using the user credentials (Username and password). 2. select a drop down and click submit button. 3. Then check for the status of the page. Please help me how to... (1 Reply)
Discussion started by: vidhyaS
1 Replies

7. Shell Programming and Scripting

Javascript or HTML to retrieve apache username

I have a internal wesbite set up and any visitor must enter username / passwd as defined in apache (I've set these up using htpasswd) I use cgi scripts set up using ksh or javascript to populate pages / tables etc. I want to be able to get the apache username that the used authorised... (3 Replies)
Discussion started by: frustrated1
3 Replies

8. Web Development

Apache - redirecting authenticated users to other sites

Hi everyone. Im really new here, so please have patience with me if i act out of order in any way. I do have some unix experience, but i would not call it extensive. The problem i am about to describe probably have a easy solution, but i have been unable to find it while speaking to Mr.Google... (4 Replies)
Discussion started by: antiw2k3
4 Replies

9. BSD

Problem userdir ~username on apache

i have problem user cannot add or edit file on their directory i mean /home/user/public_html i have httpd.conf like this : ................ # UserDir Include etc/apache22/extra/httpd-userdir.conf and httpd-userdir.conf ................ # UserDir public_html UserDir disabled... (2 Replies)
Discussion started by: moslemovic
2 Replies

10. Linux

Enable sudo for Win AD users authenticated with Linux samba winbind service

Hi everyone, I wonder if anyone ever came across the idea of unifying AD and Linux user accounts We have a Linux machine with 'samba' 'winbind' service configured to let Windows AD users to logon locally using their AD accounts and passwords. I can use 'su' to get to the local user privilege... (0 Replies)
Discussion started by: will_mike
0 Replies
Login or Register to Ask a Question