Keep Server Online
  
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
  
or
  
 
  
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.
 |    |   
 | 
     Topic: mod_authnz_external :  Config  for /etc/shadow authenticate | 
 |   
| Author | 
  | 
 
vlrk
 
 
  Joined: 28 Sep 2018 Posts: 3 Location: india
  | 
 Posted: Fri 28 Sep '18 15:17    Post subject: mod_authnz_external :  Config  for /etc/shadow authenticate | 
     | 
 
  | 
 
Hi All,
 
 
I want the system user authentication to get on my webpages.
 
 
I am using apache 2.4.33 with mod_authnz_external
 
 
I have following conifg added in httpd.conf
 
 
 	  | Code: | 	 		  
 
 
LoadModule authnz_external_module modules/mod_authnz_external.so
 
 
DefineExternalAuth archive_auth checkpassword "/bin/checkpassword /bin/true"
 
 
 
DocumentRoot "/home/tuser/apache2/htdocs"
 
<Directory "/home/tuser/apache2/htdocs">
 
    AllowOverride All
 
    Options Indexes FollowSymLinks
 
    AuthType Basic
 
    AuthName "Authentication Required"
 
    AuthBasicProvider external
 
    AuthExternal archive_auth
 
    Require all valid-user
 
</Directory>
 
 
 | 	  
 
When ever i start the httpd it gives me error as below 
 
 
AH00526: Syntax error on line 169 of /usr/local/apache2/conf/httpd.conf:
 
Invalid command 'AuthType', perhaps misspelled or defined by a module not included in the server configuration
 
 
 
 
Not sure..what went wrong , any of your suggestions would highly appreciated. | 
 
  | 
 
| Back to top | 
 | 
 
Xing Moderator
  
  Joined: 26 Oct 2005 Posts: 49
 
  | 
 | 
 
| Back to top | 
 | 
 
vlrk
 
 
  Joined: 28 Sep 2018 Posts: 3 Location: india
  | 
 Posted: Sun 30 Sep '18 6:12    Post subject:  | 
     | 
 
  | 
 
xing thanks for the reply,
 
 
"AuthType Basic" is resolved still i get error with 
 
"AuthBasicProvider".
 
 
 
Below are the modules it show , when i comment AuthBasicProvider
 
 
/home/test/apache2/bin/httpd -M
 
Loaded Modules:
 
 core_module (static)
 
 so_module (static)
 
 http_module (static)
 
 mpm_event_module (static)
 
 authn_core_module (shared)
 
 unixd_module (shared)
 
 authz_core_module (shared)
 
 authnz_external_module (shared)
 
 
Configration is as below
 
 
 	  | Code: | 	 		  
 
 
 
LoadModule authn_core_module modules/mod_authn_core.so
 
LoadModule unixd_module modules/mod_unixd.so
 
LoadModule authz_core_module modules/mod_authz_core.so
 
LoadModule authnz_external_module modules/mod_authnz_external.so
 
 
DefineExternalAuth archive_auth checkpassword "/bin/checkpassword /bin/true"
 
 
<Location />
 
    AuthType Basic
 
    AuthName "Authentication Required"
 
    AuthBasicProvider external
 
    AuthExternal archive_auth
 
    Require valid-user
 
</Location>
 
 
 
 | 	  
 
 
 
# /home/test/apache2/bin/httpd
 
AH00526: Syntax error on line 179 of /usr/local/apache2/conf/httpd.conf:
 
Invalid command 'AuthBasicProvider', perhaps misspelled or defined by a module not included in the server configuration
 
 
 
 
I am following the below configuration provided for the module.
 
 
 
 
 
 
https://github.com/haegar/mod-auth-external/wiki/ConfigApache24#31-external-password-authenticators
 
 
3.1. External Password Authenticators
 
For normal user authentication, the following directives should be in the .htaccess file or <Directory> block:
 
 
AuthType Basic
 
AuthName <authname>
 
AuthBasicProvider external
 
AuthExternal <keyword>
 
Require valid-user
 
Here <authname> identifies what we are authenticating for - it usually appears in the browser's pop-up login window. <keyword> matches a keyword you defined with DefineExternalAuth or AddExternalAuth in step 2.
 
 
 
Any pointers would be really helpful for me here.
 
 
thanks | 
 
  | 
 
| Back to top | 
 | 
 
Xing Moderator
  
  Joined: 26 Oct 2005 Posts: 49
 
  | 
 | 
 
| Back to top | 
 | 
 
vlrk
 
 
  Joined: 28 Sep 2018 Posts: 3 Location: india
  | 
 Posted: Mon 01 Oct '18 13:11    Post subject:  | 
     | 
 
  | 
 
conf is as below
 
 
 	  | Code: | 	 		  
 
LoadModule authn_core_module modules/mod_authn_core.so
 
LoadModule unixd_module modules/mod_unixd.so
 
LoadModule authz_core_module modules/mod_authz_core.so
 
#LoadModule authn_file_module modules/mod_authn_file.so
 
LoadModule authnz_external_module modules/mod_authnz_external.so
 
LoadModule auth_basic_module modules/mod_auth_basic.so
 
LoadModule authz_user_module modules/mod_authz_user.so
 
 
DefineExternalAuth pwauth pipe /usr/bin/pwauth
 
 
<Location />
 
    AuthType Basic
 
    AuthName "Authentication Required"
 
    AuthBasicProvider external
 
    #AuthExternal archive_auth
 
    AuthExternal pwauth
 
    Require valid-user
 
</Location>
 
 
 | 	  
 
 
Apache error log is as below.
 
 
 
[Mon Oct 01 15:25:53.660000 2018] [authz_core:debug] [pid 30383:tid 3078392720] mod_authz_core.c(809): [client 10.65.154.31:63658] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
 
[Mon Oct 01 15:25:53.660000 2018] [authnz_external:error] [pid 30383:tid 3078392720] [client 10.65.154.31:63658] AuthExtern pwauth [/usr/bin/pwauth]: Failed (50) for user admin
 
[Mon Oct 01 15:25:53.660000 2018] [auth_basic:error] [pid 30383:tid 3078392720] [client 10.65.154.31:63658] AH01617: user admin: authentication failure for "/": Password Mismatch
 
 
Not sure really, why it's showing the mismatch.
 
 
Any pointers would be helpfull.
 
 
thanks | 
 
  | 
 
| Back to top | 
 | 
 
 
 
 
 | 
 
 
 |  
 
 |  
  |   
 |