[pmwiki-users] authenticate against samba PDC

Patrick R. Michaud pmichaud at pobox.com
Fri Nov 24 13:34:01 CST 2006


On Fri, Nov 24, 2006 at 04:49:15PM +0100, Falk Hamann wrote:
> 
> The following hack solve the Problem.
> 
> --- authuser.php_orig   2006-11-24 16:37:06.000000000 +0100
> +++ authuser.php        2006-11-24 16:36:16.000000000 +0100
> @@ -35,6 +35,8 @@
>  if (@$_POST['authid']) 
>    AuthUserId($pagename, stripmagic(@$_POST['authid']), 
>               stripmagic(@$_POST['authpw']));
> +elseif (@$_SERVER['REMOTE_USER'])
> +  AuthUserId($pagename, stripmagic(@$_SERVER['REMOTE_USER']));
>  else SessionAuth($pagename);
>  
>  function AuthUserId($pagename, $id, $pw=NULL) {
> 
> 
> I mean, it's not the best solution. I wish, I can write something to
> config.php and let pmwiki-code anchanged.
> 
> Any hints ?

How about (in config.php):

    include_once('scripts/authuser.php');
    if (@$_SERVER['REMOTE_USER'])
      AuthUserId($pagename, stripmagic(@$_SERVER['REMOTE_USER']));

Pm




More information about the pmwiki-users mailing list