LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-12-2007, 02:24 PM   #1
DoDo1975
LQ Newbie
 
Registered: Nov 2006
Posts: 17

Rep: Reputation: 0
Get username from CGI script


Hi,

I am using a little web server called boa.

I want to determine the login name that was used when the user was being authenticated by the web server.

env or printenv doesnt work as they dont list the username. I am using the .htaccess method of authentication.

Anybody help?
 
Old 01-14-2007, 07:41 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Usually $USER can be used..

echo $USER #--> Should print the current user name but might be different with .htaccess authentication and I'm too lazy to look it up..
 
Old 01-15-2007, 12:38 AM   #3
DoDo1975
LQ Newbie
 
Registered: Nov 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the attempt.

Just in case anyone else has the same question I ended up solving this in a different way.

I dont know about regular web servers, but with boa, there is no user session variable. I couldn't find another way to get this without some kluge solution, so I went into the source code and had it write a session variable for the user when it was writing all its others.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script that uses username/password paul_mat Linux - Software 2 10-25-2005 10:44 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 11:43 AM
CGI script: username specific hamish Linux - Software 1 01-17-2005 08:00 AM
Using su <username> in Script lapthorn Programming 2 02-24-2004 09:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration