You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by syed mehdi <sm...@gmail.com> on 2008/04/23 07:00:14 UTC

[users@httpd] ldap authentication

When a user authenticates using LDAP user/paswd to execute a script placed
at server, then how can the script determine which user have executed it
(after authentication). By this we can keep track of users making changes in
database otherwise any user can make changes anywhere and it will be in a
bad condition. I think some environment variables (UID) can help in this,
but don't know exactly how. please help.

Thanks & Regards
Syed

Re: [users@httpd] ldap authentication

Posted by syed mehdi <sm...@gmail.com>.
ok if i have to do it on application side, then how can i determine which
user have authenticated.
regards
syed

On Wed, Apr 23, 2008 at 1:24 PM, Mohammed Salih <li...@gmail.com> wrote:

> Why don't you do this in Application side, Where you can have better
> control over what you do.
>
> Cheers
> Salih
>
> On Wed, Apr 23, 2008 at 9:00 AM, syed mehdi <sm...@gmail.com> wrote:
> > When a user authenticates using LDAP user/paswd to execute a script
> placed
> > at server, then how can the script determine which user have executed it
> > (after authentication). By this we can keep track of users making
> changes in
> > database otherwise any user can make changes anywhere and it will be in
> a
> > bad condition. I think some environment variables (UID) can help in
> this,
> > but don't know exactly how. please help.
> >
> > Thanks & Regards
> > Syed
> >
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] ldap authentication

Posted by Mohammed Salih <li...@gmail.com>.
Why don't you do this in Application side, Where you can have better
control over what you do.

Cheers
Salih

On Wed, Apr 23, 2008 at 9:00 AM, syed mehdi <sm...@gmail.com> wrote:
> When a user authenticates using LDAP user/paswd to execute a script placed
> at server, then how can the script determine which user have executed it
> (after authentication). By this we can keep track of users making changes in
> database otherwise any user can make changes anywhere and it will be in a
> bad condition. I think some environment variables (UID) can help in this,
> but don't know exactly how. please help.
>
> Thanks & Regards
> Syed
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ldap authentication

Posted by syed mehdi <sm...@gmail.com>.
i tried to access user name (who have authenticated via LDAP) using the
variable REMOTE_USER in python like:
print REMOTE_USER
but it gave an exception

Thanks & Regards
syed

On Wed, Apr 23, 2008 at 5:15 PM, Krist van Besien <kr...@gmail.com>
wrote:

> On Wed, Apr 23, 2008 at 7:00 AM, syed mehdi <sm...@gmail.com> wrote:
> > When a user authenticates using LDAP user/paswd to execute a script
> placed
> > at server, then how can the script determine which user have executed it
> > (after authentication). By this we can keep track of users making changes
> in
> > database otherwise any user can make changes anywhere and it will be in a
> > bad condition. I think some environment variables (UID) can help in this,
> > but don't know exactly how. please help.
>
> The script gets passed a whole list of environment variables. On of
> these variables is REMOTE_USER which will be set to whichever username
> the user authenticated with.
>
> Krist
>
> --
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] ldap authentication

Posted by syed mehdi <sm...@gmail.com>.
Hi Krist,
i tried to access user name (who have authenticated via LDAP) using the
variable REMOTE_USER in python like:

if request.environ.has_key('REMOTE_USER'):
    name = request.environ['REMOTE_USER']
    print name

but it gave an exception, any clue by any other user also?

Thanks & Regards

On Wed, Apr 23, 2008 at 5:15 PM, Krist van Besien <kr...@gmail.com>
wrote:

> On Wed, Apr 23, 2008 at 7:00 AM, syed mehdi <sm...@gmail.com> wrote:
> > When a user authenticates using LDAP user/paswd to execute a script
> placed
> > at server, then how can the script determine which user have executed it
> > (after authentication). By this we can keep track of users making changes
> in
> > database otherwise any user can make changes anywhere and it will be in a
> > bad condition. I think some environment variables (UID) can help in this,
> > but don't know exactly how. please help.
>
> The script gets passed a whole list of environment variables. On of
> these variables is REMOTE_USER which will be set to whichever username
> the user authenticated with.
>
> Krist
>
> --
> krist.vanbesien@gmail.com
> krist@vanbesien.org
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] ldap authentication

Posted by Danie Qian <da...@bestningning.com>.
----- Original Message ----- 
From: "Krist van Besien" <kr...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, April 23, 2008 7:45 AM
Subject: Re: [users@httpd] ldap authentication


> On Wed, Apr 23, 2008 at 7:00 AM, syed mehdi <sm...@gmail.com> wrote:
>> When a user authenticates using LDAP user/paswd to execute a script 
>> placed
>> at server, then how can the script determine which user have executed it
>> (after authentication). By this we can keep track of users making changes 
>> in
>> database otherwise any user can make changes anywhere and it will be in a
>> bad condition. I think some environment variables (UID) can help in this,
>> but don't know exactly how. please help.
>
> The script gets passed a whole list of environment variables. On of
> these variables is REMOTE_USER which will be set to whichever username
> the user authenticated with.
>
REMOTE_USER doesnt always work in some of our PHP applications. I have to 
use $_SERVER['PHP_AUTH_USER'] instead. 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ldap authentication

Posted by Krist van Besien <kr...@gmail.com>.
On Wed, Apr 23, 2008 at 7:00 AM, syed mehdi <sm...@gmail.com> wrote:
> When a user authenticates using LDAP user/paswd to execute a script placed
> at server, then how can the script determine which user have executed it
> (after authentication). By this we can keep track of users making changes in
> database otherwise any user can make changes anywhere and it will be in a
> bad condition. I think some environment variables (UID) can help in this,
> but don't know exactly how. please help.

The script gets passed a whole list of environment variables. On of
these variables is REMOTE_USER which will be set to whichever username
the user authenticated with.

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org