Page 1 of 1

How to use mod_auth_basic for basic auth with linux user?

PostPosted: 24. January 2019 14:12
by jmar83
Hi there

Config:

Apache:

Code: Select all
        <IfModule mod_authnz_external.c>
          #AddExternalAuth pwauth /usr/sbin/pwauth
          #SetExternalAuthMethod pwauth pipe
          DefineExternalAuth pwauth pipe /usr/sbin/pwauth
        </IfModule>


.htaccess:

Code: Select all
<IfModule mod_authnz_external.c>
  AuthType Basic
  AuthName "Login"
  AuthBasicProvider external
  AuthExternal pwauth
  Require valid-user
</IfModule>



Apache log:

Code: Select all
[Thu Jan 24 14:11:29.450802 2019] [authnz_external:error] [pid 647] [client 192.168.178.184:54094] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (3) for user root
[Thu Jan 24 14:11:29.451002 2019] [auth_basic:error] [pid 647] [client 192.168.178.184:54094] AH01617: user root: authentication failure for "/configure_wlan.php": Password Mismatch



Why? What they write here seems to be nonsense: https://serverfault.com/questions/45278 ... unt#692619

Thx for feedbacks! :-)

Re: How to use mod_auth_basic for basic auth with linux user

PostPosted: 24. January 2019 14:28
by jmar83
chmod u+s /usr/bin/pwauth does also not work, i copied /usr/bin/pwauth to /usr/bin/pwauth2 because i don't want to touch the original file. so chmod u+s /usr/bin/pwauth2 and /usr/bin/pwauth2 in apache config. does also not work?!?

Maybe it's not compatible on Rasbpian stretch??

Re: How to use mod_auth_basic for basic auth with linux user

PostPosted: 24. January 2019 21:40
by Nobbie
And what is the Xampp part of this issue??