Changes

From SME Server
Jump to navigationJump to search
1,552 bytes added ,  23:46, 27 October 2013
Line 287: Line 287:  
           '''$OUT .= "    require user admin pierre paul\n";'''
 
           '''$OUT .= "    require user admin pierre paul\n";'''
 
           '''$OUT .= "    require group virt \n";'''
 
           '''$OUT .= "    require group virt \n";'''
 +
          $OUT .= "    Satisfy $satisfy\n";
 +
}
 +
 +
*DB command to choose groups and users
 +
Above we have seen how to write name of groups or users directly in the template, but in the real life it is not enough good :)
 +
The purpose is to choose users or groups by command line.
 +
 +
-In first you have to make other DB configuration as described [[Web_Application_RPM#db_defaults]]
 +
echo "admin" >        root/etc/e-smith/db/configuration/defaults/phpvirtualbox/User
 +
echo "" >              root/etc/e-smith/db/configuration/defaults/phpvirtualbox/Group
 +
 +
-You have to download a plugin of pwauth to authenticate unix group in SME Server 8 : http://code.google.com/p/pwauth/
 +
wget http://pwauth.googlecode.com/files/pwauth-2.3.10.tar.gz
 +
tar xvzf pwauth-2.3.10.tar.gz
 +
cp pwauth-2.3.10/unixgroup /usr/lib/httpd/modules/
 +
chown root:www /usr/lib/httpd/modules/unixgroup
 +
chmod 750 /usr/lib/httpd/modules/unixgroup
 +
 +
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/35-group-auth
 +
{
 +
        $OUT .= "    AddExternalGroup ugroup /usr/lib/httpd/modules/unixgroup\n";
 +
        $OUT .= "    SetExternalGroupMethod ugroup environment\n";
 +
}
 +
 +
nano /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92foo
 +
 +
{
 +
$OUT .= "    AuthName \"$name\"\n";
 +
          $OUT .= "    AuthType Basic\n";
 +
          $OUT .= "    AuthExternal pwauth\n";
 +
          $OUT .= "    GroupExternal ugroup\n";
 +
          $OUT .= "    AuthzUserAuthoritative off\n";
 +
          $OUT .= "    require user $phpvirtualbox{'User'}\n";
 +
          $OUT .= "    require group $phpvirtualbox{'Group'}\n";
 
           $OUT .= "    Satisfy $satisfy\n";
 
           $OUT .= "    Satisfy $satisfy\n";
 
  }
 
  }

Navigation menu