Changes

From SME Server
Jump to navigationJump to search
947 bytes added ,  00:17, 18 November 2013
Line 278: Line 278:  
  {
 
  {
 
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
 
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
         $OUT .= "    SetExternalGroupMethod ugroup environment\n";
+
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
  }
 
  }
   Line 287: Line 287:  
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
           $OUT .= "    GroupExternal ugroup\n";
+
           $OUT .= "    GroupExternal unixgroup\n";
 
           $OUT .= "    AuthzUserAuthoritative off\n";
 
           $OUT .= "    AuthzUserAuthoritative off\n";
 
           '''$OUT .= "    require user admin pierre paul\n";'''
 
           '''$OUT .= "    require user admin pierre paul\n";'''
Line 314: Line 314:  
  {
 
  {
 
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
 
         $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
         $OUT .= "    SetExternalGroupMethod ugroup environment\n";
+
         $OUT .= "    SetExternalGroupMethod unixgroup environment\n";
 
  }
 
  }
 
   
 
   
Line 326: Line 326:  
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthType Basic\n";
 
           $OUT .= "    AuthExternal pwauth\n";
 
           $OUT .= "    AuthExternal pwauth\n";
           $OUT .= "    GroupExternal ugroup\n";
+
           $OUT .= "    GroupExternal unixgroup\n";
 +
          $OUT .= "    AuthzUserAuthoritative off\n";
 +
          $OUT .= "    require user $foo{'User'}\n";
 +
          $OUT .= "    require group $foo{'Group'}\n";
 +
          $OUT .= "    Satisfy $satisfy\n";
 +
}
 +
 
 +
-change groups and users allowed by CL
 +
 
 +
config setprop foo User "admin toto"
 +
config setprop foo Group "famille virt"
 +
then
 +
signal-event console-save
 +
 
 +
=====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]
 +
 
 +
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92foo
 +
 
 +
{
 +
$OUT .= "    AuthName \"$name\"\n";
 +
          $OUT .= "    '''AuthBasicProvider external'''\n";
 +
          $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthExternal pwauth\n";
 +
          $OUT .= "    GroupExternal unixgroup\n";
 
           $OUT .= "    AuthzUserAuthoritative off\n";
 
           $OUT .= "    AuthzUserAuthoritative off\n";
 
           $OUT .= "    require user $foo{'User'}\n";
 
           $OUT .= "    require user $foo{'User'}\n";

Navigation menu