logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: How to use mod_auth_basic for basic auth with linux user?
Author
jmar83



Joined: 10 Mar 2018
Posts: 16
Location: CH

PostPosted: Thu 24 Jan '19 15:15    Post subject: How to use mod_auth_basic for basic auth with linux user? Reply with quote

Hi there

Config:

Apache:

Code:

        <IfModule mod_authnz_external.c>
          #AddExternalAuth pwauth /usr/sbin/pwauth
          #SetExternalAuthMethod pwauth pipe
          DefineExternalAuth pwauth pipe /usr/sbin/pwauth
        </IfModule>


.htaccess:

Code:

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



Apache log:

Code:

[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/authenticate-in-apache-via-system-account#692619

Thx for feedbacks! Smile


EDIT: 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??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 27 Mar '19 16:31    Post subject: Reply with quote

mod_auth_pam is your friend for that.
Back to top


Reply to topic   Topic: How to use mod_auth_basic for basic auth with linux user? View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules