Changes

From SME Server
Jump to navigationJump to search
444 bytes added ,  10:28, 14 January 2016
m
→‎Apache Authentication: add AuthBasicProvider directive
Line 234: Line 234:  
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthBasicProvider external\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    require valid-user\n";
 
           $OUT .= "    require valid-user\n";
Line 249: Line 250:  
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthBasicProvider external\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           '''$OUT .= "    require valid-user\n";'''
 
           '''$OUT .= "    require valid-user\n";'''
Line 259: Line 261:  
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthBasicProvider external\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           '''$OUT .= "    require user admin pierre paul\n";'''
 
           '''$OUT .= "    require user admin pierre paul\n";'''
Line 278: Line 281:  
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
  {
 
  {
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
+
         $OUT .= "    AddExternalGroup unixgroup /usr/lib/httpd/modules/unixgroup\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
  }
 
  }
Line 287: Line 290:  
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthName \"$name\"\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthBasicProvider external\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    GroupExternal unixgroup\n";
 
           $OUT .= "    GroupExternal unixgroup\n";
Line 314: Line 318:  
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
  {
 
  {
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
+
         $OUT .= "    AddExternalGroup unixgroup /usr/lib/httpd/modules/unixgroup\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
  }
 
  }
Line 342: Line 346:     
=====SME Server 9=====
 
=====SME Server 9=====
The apache authentication is made by a new file named  authnz_external_module instead of auth_external_module, therefore you need to slightly modify the code above. see this [http://code.google.com/p/mod-auth-external/wiki/ConfigApache22 howTo]
+
The apache authentication is made by a new file named  authnz_external_module instead of auth_external_module, therefore you need to slightly modify the code above. <br />
You need to verify if your /etc/httpd/conf/httpd.conf contain these lines
+
If it is not done you can have this error in log file and you won't be authenticated
 +
configuration error:  couldn't check user.  No user file?:
 +
See this [http://code.google.com/p/mod-auth-external/wiki/ConfigApache22 howTo]. You need to verify if your /etc/httpd/conf/httpd.conf contain these lines
 
  AddExternalGroup unixgroup /usr/bin/unixgroup
 
  AddExternalGroup unixgroup /usr/bin/unixgroup
 
  SetExternalGroupMethod unixgroup environment
 
  SetExternalGroupMethod unixgroup environment
   −
if it is not the case, you can make the relevant fragment template.
+
We are waiting the default use of authenticator unixgroup in sme9 (see [[bugzilla:8008]]). For now you need to make the relevant fragment template.
 +
 
 
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 
  {
 
  {
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
+
         $OUT .= "    AddExternalGroup unixgroup /usr/bin/unixgroup\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
  }
 
  }

Navigation menu