Action disabled: source

Backuppc fuer die Verwendung von LDAP konfigurieren

Verwendetes System: Ubuntu 14.04

Hierfür muss man folgende Dinger erledigen:

  • Installation der benötigten Apachemodule
  • Ändern der Konfiguration von Backuppc
  • Festlegen einer Admingruppe für Backuppc

Für die Installation folgende Pakete auswählen:

apt-get install libapache-authznetldap-perl libapache2-mod-vhost-ldap

Die Module in Apache aktivieren. Diese beiden Befehle sind für Debian ähnliche Systeme wie z.B. Ubuntu gültig. Unter Gentoo muss man die Module manuell in die Config eintragen.

a2enmod ldap
a2enmod authnz_ldap

In der Konfigfile von backuppc folgende Änderungen erledigen: nano /etc/backuppc/config.pl

$Conf{CgiAdminUserGroup} = 'backuppc andere_admingruppe';
$Conf{CgiAdminUsers} = 'backuppc user1 user2';

Jetzt noch das LDAP in der Apacheconfig von Backuppc festlegen. nano /etc/backuppc/apache.conf

Alias /backuppc /usr/share/backuppc/cgi-bin/

<Directory /usr/share/backuppc/cgi-bin/>
        AllowOverride None
        Allow from all

        # Uncomment the line below to ensure that nobody can sniff importanti
        # info from network traffic during editing of the BackupPC config or
        # when browsing/restoring backups.
        # Requires that you have your webserver set up for SSL (https) access.
        #SSLRequireSSL

        Options ExecCGI FollowSymlinks
        AddHandler cgi-script .cgi
        DirectoryIndex index.cgi

#       AuthUserFile /etc/backuppc/htpasswd
#       AuthType basic
#       AuthName "BackupPC admin"
#       require valid-user
        AuthType Basic
        AuthName "Auth Message"
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative on
        AuthLDAPURL "ldap://ldapslave.tux.local ldapmaster.tux.local box.tux.local/dc=tux,dc=local?uid?sub"
        AuthLDAPGroupAttribute memberUid
        AuthLDAPGroupAttributeIsDN off
        Require ldap-group cn=backuppc,ou=usergroups,ou=group,ou=wiki,ou=wifi,ou=hallo,ou=messaging,ou=webhosting,dc=tux,dc=local

</Directory>

Wie man sieht wird er Teil mit der „htpasswd“ einfach auskommentiert. Ganz unten wird dann die Gruppe angegeben wo der Benutzer Mitglied sein muss damit es ihm überhaupt möglich ist auf des Interface von Backuppc zu zugreifen.

Für Ubuntu apacheLDAP aktivieren:

sudo a2enmod authnz_ldap

First add following to the global Apache ldap config /etc/apache2/modules.d/46_mod_ldap.conf:

LDAPTrustedMode TLS
LDAPVerifyServerCert On
LDAPTrustedGlobalCert CA_BASE64 /etc/openldap/ssl/ldap1.ca

This confirms that only TLS connections are allowed with the specified CA File (copy the ca file first into the specified location).

Then you can use LDAP-Auth as following:

AuthType Basic
AuthName "Auth Message"
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL "ldap://dc1.tux.lan dc2.tux.lan/dc=tux,dc=lan?uid?sub"
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
Require ldap-group cn=tuxgroups,ou=group,dc=tux,dc=lan

Just edit this to your needs, for example another group is required for Auth.