summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ca4ecd)
raw | patch | inline | side by side (parent: 0ca4ecd)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 14:43:09 +0000 (14:43 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 14:43:09 +0000 (14:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10246 594d385d-05f5-0310-b6e9-bd551577e9d8
12 files changed:
gosa-core/contrib/attic/README.OpenSides | [new file with mode: 0644] | patch | blob |
gosa-core/contrib/demo.ldif | [deleted file] | patch | blob | history |
gosa-core/contrib/fix_munged | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/README.OpenSides | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/glpi.README | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/goNagios.pl | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/goSamba.pl | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/nagios.README | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/phpscheduleit.README | [deleted file] | patch | blob | history |
gosa-core/contrib/opensides/pptp.README | [deleted file] | patch | blob | history |
gosa-core/debian/docs | patch | blob | history | |
gosa-core/debian/install | patch | blob | history |
diff --git a/gosa-core/contrib/attic/README.OpenSides b/gosa-core/contrib/attic/README.OpenSides
--- /dev/null
@@ -0,0 +1,31 @@
+goSamba.pl - This script will help you populate your ldap tree with
+ the correct attribute when using the smbldap-tools
+ from idealx.
+
+goNagios.pl - This script will help you to manage the authentification
+ users inside of the cgi.cfg, contacts.cfg, contactgroups.cfg
+
+glpi.README - how to make the glpi plugin work
+
+nagios.README - how to make the nagios plugin work
+
+pptp.README - how to make the pptp connectivity extension work
+
+phpscheduleit.README - how to make the phpscheduleit extension work
+
+
+The php_writeexcel library is coming from
+
+http://www.bettina-attack.de/jonny/projects/php_writeexcel/
+
+Author : <jonny@1409.org>
+
+LICENSE : GNU LESSER GENERAL PUBLIC LICENSE
+
+Bug:
+
+It doesn't work on php5 we are working on it.
+
+Benoit Mortier <benoit.mortier@opensides.be>
+Guillaume Delecourt <guillaume.delecourt@opensides.be>
+Vincent Seynhaeve <vincent.seynhaeve@opensides.be>
diff --git a/gosa-core/contrib/demo.ldif b/gosa-core/contrib/demo.ldif
+++ /dev/null
@@ -1,48 +0,0 @@
-dn: dc=gonicus,dc=de
-objectClass: dcObject
-objectClass: organization
-description: Base object
-dc: gonicus
-o: GONICUS GmbH
-
-dn: cn=terminal-admin,dc=gonicus,dc=de
-objectClass: person
-cn: terminal-admin
-sn: Upload user
-description: GOto Upload Benutzer
-userPassword:: e2tlcmJlcm9zfXRlcm1pbmFsYWRtaW5AR09OSUNVUy5MT0NBTAo=
-
-dn: ou=groups,dc=gonicus,dc=de
-objectClass: organizationalUnit
-ou: groups
-
-dn: ou=people,dc=gonicus,dc=de
-objectClass: organizationalUnit
-ou: people
-
-dn: cn=admin,ou=people,dc=gonicus,dc=de
-objectClass: person
-objectClass: organizationalPerson
-objectClass: inetOrgPerson
-objectClass: gosaAccount
-uid: admin
-cn: admin
-givenName: admin
-sn: GOsa main administrator
-sambaLMPassword: 10974C6EFC0AEE1917306D272A9441BB
-sambaNTPassword: 38F3951141D0F71A039CFA9D1EC06378
-userPassword:: dGVzdGVy
-
-dn: cn=administrators,ou=groups,dc=gonicus,dc=de
-objectClass: gosaObject
-objectClass: posixGroup
-objectClass: top
-gosaSubtreeACL: :all
-cn: administrators
-gidNumber: 999
-memberUid: admin
-
-dn: ou=incoming,dc=gonicus,dc=de
-objectClass: organizationalUnit
-ou: incoming
-
diff --git a/gosa-core/contrib/fix_munged b/gosa-core/contrib/fix_munged
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/php
-<?php
-require_once('../include/class_sambaMungedDial.inc');
-
-/*
- * GOsa: fix_munged.php - Modify existings sambaMungedDial-Entries to work with latest Win2003SP1
- *
- * Authors: Jan Wenzel <jan.wenzel@GONICUS.de>
- *
- * Copyright (C) 2006 GONICUS GmbH
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Contact information: GONICUS GmbH
- * Moehnestrasse 11-17
- * D-59755 Arnsberg
- * Germany
- * tel: ++49 2932 916 0
- * fax: ++49 2932 916 230
- * email: info@GONICUS.de
- * http://www.GONICUS.de
- * */
-
-/* Modify these settings to your needs */
-$ldap_host= "localhost";
-$ldap_port= "389";
-$ldap_base= "dc=gonicus,dc=de";
-$ldap_admin= "cn=ldapadmin,".$ldap_base;
-$ldap_password= "tester";
-
-/* Internal Settings */
-$ldap_protocol= "3";
-$filter= "(&(objectClass=sambaSamAccount)(sambaMungedDial=*))";
-$attributes= array("dn","sambaMungedDial");
-
-print("This script will try to convert all ldap entries that have the sambaMungedDial-Attribute set, into the new \n".
- "format that win2003sp1 and later requires. If an entry is already in the new format, it is not touched. \n".
- "BEWARE: This script is not widely tested yet, so use it at your own risk! Be sure to backup your complete LDAP \n".
- "before running.\n".
- "Do you want to continue (y/n)?\n");
-
-$handle= fopen("php://stdin","r");
-$input=(fgets($handle,16));
-fclose($handle);
-if(substr(strtolower($input),0,1)!="y") {
- exit(1);
-}
-/* Connect to server */
-$connection= ldap_connect($ldap_host,$ldap_port)
- or die ('Could not connect to server '.$ldap_host."\n!");
-ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, $ldap_protocol);
-ldap_bind($connection,$ldap_admin,$ldap_password)
- or die ('Could not bind to server '.$ldap_host."!\n");
-
-$results= ldap_get_entries($connection, ldap_search($connection, $ldap_base, $filter, $attributes));
-
-$count= 0;
-
-if(array_key_exists('count', $results)) {
- $count= $results['count'];
-}
-
-if($count > 0) {
- print('We found '.$count.' matching '.(($count==1)?'entry':'entries').".\n");
-}
-
-for($i=0; $i<$count; $i++) {
- $entry= $results[$i];
- print('Converting '.$entry['dn'].'...');
- $mungedDial = new sambaMungedDial();
- $mungedDial->load($entry['sambamungeddial'][0]);
- $modify['sambaMungedDial'][0]= $mungedDial->getMunged();
- if(ldap_modify($connection,$entry['dn'],$modify)) {
- print("done.\n");
- } else {
- print("failed.\n");
- }
-}
-
-ldap_close($connection);
-?>
-
diff --git a/gosa-core/contrib/opensides/README.OpenSides b/gosa-core/contrib/opensides/README.OpenSides
+++ /dev/null
@@ -1,31 +0,0 @@
-goSamba.pl - This script will help you populate your ldap tree with
- the correct attribute when using the smbldap-tools
- from idealx.
-
-goNagios.pl - This script will help you to manage the authentification
- users inside of the cgi.cfg, contacts.cfg, contactgroups.cfg
-
-glpi.README - how to make the glpi plugin work
-
-nagios.README - how to make the nagios plugin work
-
-pptp.README - how to make the pptp connectivity extension work
-
-phpscheduleit.README - how to make the phpscheduleit extension work
-
-
-The php_writeexcel library is coming from
-
-http://www.bettina-attack.de/jonny/projects/php_writeexcel/
-
-Author : <jonny@1409.org>
-
-LICENSE : GNU LESSER GENERAL PUBLIC LICENSE
-
-Bug:
-
-It doesn't work on php5 we are working on it.
-
-Benoit Mortier <benoit.mortier@opensides.be>
-Guillaume Delecourt <guillaume.delecourt@opensides.be>
-Vincent Seynhaeve <vincent.seynhaeve@opensides.be>
diff --git a/gosa-core/contrib/opensides/glpi.README b/gosa-core/contrib/opensides/glpi.README
+++ /dev/null
@@ -1,13 +0,0 @@
-To use the glpi connectivity extension
-
-1) Add the glpi.schema to your schema directory
-
-2) Remove the comment in front of glpiAccount in gosa.conf
-
-<!-- <tab class="glpiAccount" /> -->
-
-Benoit Mortier
-OpenSides November 2005
-
-
-
diff --git a/gosa-core/contrib/opensides/goNagios.pl b/gosa-core/contrib/opensides/goNagios.pl
+++ /dev/null
@@ -1,391 +0,0 @@
-#!/usr/bin/perl -w
-
-
-# Copyright (C) 2005 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-# Copyright (C) 2005 Vincent Senave <vincent.senave@opensides.be>
-#
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-
-use Net::LDAP;
-use Getopt::Std;
-use Net::LDAP::Schema;
-use Net::LDAP::LDIF;
-use Data::Dumper;
-use MIME::Lite;
-use Sys::Syslog;
-use Switch;
-use strict;
-
-# Variables a config
-
-my $admindef="admin";
-
-my $cgi_file="cgi.cfg";
-my $contacts_file="contacts.cfg";
-my $contacts_groups_file="contactgroups.cfg";
-
-my $TS_FILE='/tmp/gosa_timestamp';
-my %Options;
-my $nb_user=0;
-my $nb_groupe=0;
-
-my ($i,$file,$ldap,@nagiosmail,
- $line,$text,$mesg,$entry,$userlist1,$userlist2,$userlist3,$userlist4,
- $userlist5,$userlist6,$userlist7,$msg,@groupname,@groupmembers,@contactlias,
- @groupdescription,@servicenotificationoptions,@servicenotificationperiod,
- @hostnotificationoptions,@hostnotificationperiod,$stdout,
- $usercontact,$members,@contactname,@nagiosalias,$j,@entries
-);
-
-# Les parametres de connexion proviennent du fichier smbldap-bind.conf
-my $gosa_bind_conf="/etc/gosa_bind.conf";
-my $gosa_ldap_conf="/etc/gosaldap.conf";
-my %config_bind = &read_conf($gosa_bind_conf);
-my %config = &read_conf($gosa_ldap_conf);
-
-my $peopleou=$config{peopleou};
-my $groupeou=$config{groupeou};
-my $base=$config{base};
-my $scope=$config{scope};# par defaut
-my $server=$config{server};
-
-my $admin=$config_bind{masterDN};
-my $password=$config_bind{masterPw};
-
-
- $stdout.="\n\nSearch new Nagios attribute in user list\n";
- $stdout.="-"x55;$stdout.="\n";
- #my $ts = getTS;
-
-# $ldap = &anonBind;
-# $mesg = $ldap->search(
-# base => $LDAP_BASE,
-# filter => "(&(modifyTimestamp>=$ts)(!(objectClass=gosaUserTemplate)))"
-# );
-
- # Put timestamp to file
- #putTS;
-
- # Work if changes is present
- #if($mesg->count > 0)
- #{
- #$stdout.="Processing records modified after $ts\n\n";
- $ldap = Net::LDAP->new($server);
- $mesg = $ldap->bind($admin,password=>$password) or syslog('error',$mesg->err) && print $mesg->code && die $mesg->error;
-
-
-
- #Partie pour l'objectClass NAgios Contact
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosContact))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $i=0;
- foreach $entry (@entries) {
- $stdout.="\nContact $i : \nName\t\t\t";$contactname[$i]=$entry->get_value('uid');$stdout.=$contactname[$i];
- $stdout.="\n\n\tmail:\t\t\t\t";$nagiosmail[$i]=$entry->get_value('NagiosMail');$stdout.=$nagiosmail[$i];
- $stdout.="\n\talias:\t\t\t\t";$nagiosalias[$i]=$entry->get_value('NagiosAlias');$stdout.=$nagiosalias[$i];
- $stdout.="\n\tHostNotificationPeriod:\t\t";$hostnotificationperiod[$i]=$entry->get_value('HostNotificationPeriod');$stdout.=$hostnotificationperiod[$i];
- $stdout.="\n\tServiceNotificationPeriod:\t";$servicenotificationperiod[$i]=$entry->get_value('ServiceNotificationPeriod');$stdout.=$servicenotificationperiod[$i];
- $stdout.="\n\tHostNotificationOptions:\t";$hostnotificationoptions[$i]=$entry->get_value('HostNotificationOptions');$stdout.=$hostnotificationoptions[$i];
- $stdout.="\n\tServiceNotificationOptions:\t";$servicenotificationoptions[$i]=$entry->get_value('ServiceNotificationOptions');$stdout.=$servicenotificationoptions[$i];
- $stdout.="\n"." "x15;$stdout.="-"x20;$stdout.=" "x 15;
- $usercontact.=$entry->get_value('uid')." ,";
- $i++;
- }
- $nb_user=$i;
-
-
- #Partie pour l'objectClass NAgios Group
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosContactGroup))", base=>$groupeou,scope=>$scope);
- @entries = $mesg->entries;
- $i=0;
- foreach $entry (@entries) {
- $stdout.="\nGroupe $i : \nName\t\t";$groupname[$i]=$entry->get_value('cn');$stdout.=$groupname[$i];
- $stdout.="\n\n\talias:\t\t";$groupdescription[$i]=$entry->get_value('description');$stdout.=$groupdescription[$i];
- $stdout.="\n\tmembers:\t";
- $j=0;
- foreach $members($entry->get_value('memberUid'))
- {
- $stdout.=$members." ";
- $groupmembers[$i][$j]=$members;
- $j++;
- }
- $stdout.="\n"." "x15;$stdout.="-"x20;$stdout.=" "x 15;
- $i++;
- }
- $nb_groupe=$i;
-
- $userlist1.=$admindef;
-
- #Partie pour l'objectClass NagiosAuth
- $stdout.="\n\n\n\n\nAuthorization for the different Information in Nagios\n"."-" x 53;$stdout.="\n";
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedSystemInformation~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nSystem infos :\t\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist1.=$entry->get_value('uid')." ,";
- }
- $userlist1.=$admindef;
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedConfigurationInformation~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nConfiguration infos :\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist2.=$entry->get_value('uid')." , ";
- }
- $userlist2.=$admindef;
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedSystemCommands~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nSystem commands : \t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist3.=$entry->get_value('uid')." , ";
- }
- $userlist3.=$admindef;
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedAllServices~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nAll services :\t\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist4.=$entry->get_value('uid')." ,";
- }
- $userlist4.=$admindef;
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedAllHosts~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nAll hosts :\t\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist5.=$entry->get_value('uid').",";
- }
- $userlist5.=$admindef;
-
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedAllServiceCommands~=checked))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nAll services commands :\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist6.=$entry->get_value('uid').",";
- }
- $userlist6.=$admindef;
-
- $mesg = $ldap->search(filter=>"(&(objectClass~=nagiosAuth)(AuthorizedAllHostCommands~=checked))",base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- $stdout.="\nAll host commands :\t";
- foreach $entry (@entries) {
- $stdout.= $entry->get_value('uid')."\t";
- $userlist7.=$entry->get_value('uid').",";
- }
- $userlist7.=$admindef;
-
-
- &modiffile_cgi($cgi_file);
- &modiffile_contact($contacts_file);
- &modiffile_group($contacts_groups_file);
-
- $ldap->unbind;
- $stdout.="\n";
- switch($config{stdout})
- {
- case "mail" {&mail()}
- case "log" {&writelog()}
- case "normal" {print $stdout}
- }
- exit(0);
-
-sub modiffile_contact()
-{
- $file=$_[0];
- my $text="";
- open(FH,"$file") || die "Probleme d'ouverture du fichier $file";
- $stdout.="\n\n"; $stdout.=" "x10;$stdout.="-"x25;$stdout.=" "x10;
- $stdout.="\n\n$nb_user utilisateur(s) ajouté(s) dans le fichier $file\n";
- for($i=0;$i<$nb_user;$i++)
- {
- $text.="\n\ndefine contact{\n";
- $text.="\n\tcontact_name \t\t\t".$contactname[$i];
- $text.="\n\talias \t\t\t\t".$nagiosalias[$i];
- $text.="\n\thost_notification_period \t".$hostnotificationperiod[$i];
- $text.="\n\thost_notification_options \t".$hostnotificationoptions[$i];
- $text.="\n\tservice_notification_period \t".$servicenotificationperiod[$i];
- $text.="\n\tservice_notification_options \t".$servicenotificationoptions[$i];
- $text.="\n\temail \t\t\t\t".$nagiosmail[$i];
- $text.="\n}\n\n";
- }
- close(FH);
- open(FH,"> $file") || die "Probleme d'ouverture du fichier $file";
- print FH "$text";
- close(FH);
-
-}
-
-sub modiffile_group()
-{
- $file=$_[0];
- $text="";
- $j=0;
- $i=0;
- open(FH,"$file") || die "Probleme d'ouverture du fichier $file";
- $stdout.="\n\n"; $stdout.=" "x10;$stdout.="-"x25;$stdout.=" "x10;
- $stdout.="\n\n$nb_groupe groupe(s) ajouté(s) dans le fichier $file\n";
- for($i=0;$i<$nb_groupe;$i++)
- {
- $text.="\n\ndefine contact{\n";
- $text.="\n\tcontactgroup_name \t".$groupname[$i];
- $text.="\n\talias \t\t\t".$groupdescription[$i];
- $text.="\n\tmembers \t\t";
- while(defined($groupmembers[$i][$j]))
- {
- $text.=$groupmembers[$i][$j]." ";
- $j++;
- }
- $text.="\n}\n\n";
- }
-
- close(FH);
- open(FH,"> $file") || die "Probleme d'ouverture du fichier $file";
- print FH "$text";
- close(FH);
-
-}
-
-sub modiffile_cgi()
-{
- $file=$_[0];
- $text="";
- open(FH,"$file") || die "Probleme d'ouverture du fichier $file";
- while(<FH>)
- {
- $line=$_;
- #$stdout.="$line";
- if($line =~ /^authorized_for_system_information=*/i){$text.="authorized_for_system_information=".$userlist1}
- elsif($line =~ /^authorized_for_configuration_information=*/i){$text.="authorized_for_configuration_information=".$userlist2}
- elsif($line =~ /^authorized_for_system_commands=*/i){$text.="authorized_for_system_commands=".$userlist3}
- elsif($line =~ /^authorized_for_all_services=*/i){$text.="authorized_for_all_services=".$userlist4."\n"}
- elsif($line =~ /^authorized_for_all_hosts=*/i){$text.="authorized_for_all_hosts=".$userlist5}
- elsif($line =~ /^authorized_for_all_service_commands=*/i){$text.="authorized_for_all_host_commands=".$userlist6."\n"}
- elsif($line =~ /^authorized_for_all_host_commands=*/i){$text.="authorized_for_all_service_commands=".$userlist7}
- else {$text.=$line};
- }
- close(FH);
- open(FH,"> $file") || die "Probleme d'ouverture du fichier $file";
- print FH "$text";
- close(FH);
-
-}
-
-sub read_conf()
-{
- my %conf;
- open (CONFIGFILE, "$_[0]") || die "Unable to open $_[0] for reading !\n";
- while (<CONFIGFILE>) {
- chomp($_);
- ## throw away comments
- next if ( /^\s*#/ || /^\s*$/ || /^\s*\;/);
- ## check for a param = value
- my ($parameter,$value)=read_parameter($_);
- $value = &subst_configvar($value,\%conf);
- $conf{$parameter}=$value;
- }
- close (CONFIGFILE);
- return(%conf);
-}
-
-
-
-
-sub read_parameter
-{
- my $line=shift;
- ## check for a param = value
- if ($_=~/=/) {
- my ($param,$val);
- if ($_=~/"/) {
- #my ($param,$val) = ($_=~/(.*)\s*=\s*"(.*)"/);
- ($param,$val) = /\s*(.*?)\s*=\s*"(.*)"/;
- } elsif ($_=~/'/) {
- ($param,$val) = /\s*(.*?)\s*=\s*'(.*)'/;
- } else {
- ($param,$val) = /\s*(.*?)\s*=\s*(.*)/;
- }
- return ($param,$val);
- }
-}
-
-sub subst_configvar
-{
- my $value = shift;
- my $vars = shift;
-
- $value =~ s/\$\{([^}]+)\}/$vars->{$1} ? $vars->{$1} : $1/eg;
- return $value;
-}
-
-sub mail
-{
-
-if($config{email}eq ""){$config{email}="root"}
-
-$msg = MIME::Lite->new(
- From => 'monperl@opensides.be',
- To => $config{email},
- Subject => "Plugin Nagios Gosa",
- Data => $stdout
- );
-
-
-$msg->send;
-}
-
-sub writelog
-{
- open(F, "> $config{logfile}");
- print F $stdout;
- close(F);
-}
-
-# Read timestamp
-sub getTS
-{
- open(F, "< $TS_FILE");
- my $ts = <F>;
- chop $ts;
- $ts ||= "19700101000000Z";
- return $ts;
-}
-
-# save timestamp
-sub putTS
-{
- my $ts = `date -u '+%Y%m%d%H%M%SZ'`;
- open(F, "> $TS_FILE");
- $stdout.= F $ts;
-}
-
-#connexion anonyme
-sub anonBind
-{
- my $ldap = Net::LDAP->new( $server);
- my $mesg = $ldap->bind();
- $mesg->code && die $mesg->error;
- return $ldap;
-}
diff --git a/gosa-core/contrib/opensides/goSamba.pl b/gosa-core/contrib/opensides/goSamba.pl
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/usr/bin/perl
-
-
-# Copyright (C) 2005 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-
-use Net::LDAP;
-use Getopt::Std;
-use Net::LDAP::Schema;
-use Net::LDAP::LDIF;
-
-# Variables a config
-$admin="cn=ldapadmin,dc=example,dc=be";
-$password="";
-$peopleou="ou=People,dc=example,dc=be";
-$base="dc=example,dc=be";
-$scope="one"; # par defaut
-$dump_file="myldaptree.ldif";
-$server="localhost";
-
-
-my %Options;
-
-my $ok = getopts('?', \%Options);
-
-#Verifying if help is needed
-if ( (!$ok) || (@ARGV < 1) || ($Options{'?'}) ) {
- &help();
-}
-
-print "We backup the whole tree before every operation\n";
-&dump();
-
-$comm=$ARGV[0];
-
-if($comm eq "del" && @ARGV >1 )
-{
- print "You asked to delete attribute : ";
- $i=1;
- while($ARGV[$i] ne "")
- {
- print $ARGV[$i]." ";
- $i++;
- }
- print "\n";
- $ldap = Net::LDAP->new($server);
- $ldap->bind($admin,password=>$password);
-
-
- print "ldap connection" .$ldap;
-
- $mesg = $ldap->search(filter=>"(objectClass=*)",base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
-
- foreach $entry (@entries) {
- $i=1;
- print $entry->dn()."\n";
- while($ARGV[$i] ne "")
- {
- if($ARGV[$i] eq "obj"){$obj=1;$i++;next}
- if($obj==1)
- {
- $mesg = $ldap->modify($entry->dn(), delete => {"ObjectClass"=>"$ARGV[$i]"});
- print "\t objectClass: ".$ARGV[$i];
- }
- else
- {
- $mesg = $ldap->modify($entry->dn(), delete => [$ARGV[$i]]);
- print "\t attribut: ".$ARGV[$i];
- }
- $obj=0;
- $i++;
- }
-
- print "\n";
- }
- $ldap->unbind;
- exit(0);
-}
-elsif($comm eq "gosa" && @ARGV ==1)
-{
- print "Add GOsa attribute for the following users\n";
- print "---------------------------------------------\n";
- $ldap = Net::LDAP->new($server);
- $ldap->bind($admin,password=>$password);
- $mesg = $ldap->search(filter=>"&(!(objectClass~=gosaAccount))", base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
-
- foreach $entry (@entries) {
- $mesg = $ldap->modify($entry->dn(), add => { "ObjectClass" => "gosaAccount"});
- $mesg = $ldap->modify($entry->dn(), add => { "ObjectClass" => "organizationalPerson"});
- $mesg = $ldap->modify($entry->dn(), add => { "ObjectClass" => "Person"});
- print $entry->dn();
- print "\n";
- }
- $ldap->unbind;
- exit(0);
-}
-elsif($comm eq "modif" && @ARGV >1)
-{
- print "Modifications asked\n";
- print "------------------------\n";
- $ldap = Net::LDAP->new($server);
- $ldap->bind($admin,password=>$password);
-
- $mesg = $ldap->search(filter=>"(objectClass=*)",base=>$peopleou,scope=>$scope);
- @entries = $mesg->entries;
- foreach $entry (@entries) {
- $mesg = $ldap->modify($entry->dn(), replace => { "$ARGV[1]" => "$ARGV[2]" } );
- print $entry->dn()."\n\tattribut $ARGV[1] modifié avec la valeur $ARGV[2]\n";
- }
- $ldap->unbind;
- exit(0);
-}
-elsif($comm eq "dump" && @ARGV ==1)
-{
- &dump();
-}
-else
-{
- &help();
-}
-
-sub help()
-{
- print_banner;
- print "Usage: $0 [-?] command\n";
- print "\t-? show this help message\n";
- print "\tgosa -> add GOsa attributes for the whole the people branch !\n";
- print "\tdel attribut -> Remove an attribute for the whole people branch !\n";
- print "\tmodif <attribute> <attribute value> -> to modify the attribute\n";
- print "\tdump to dump the whole ldap tree\n";
- exit (1);
-}
-
-sub dump()
-{
- $ldap = Net::LDAP->new($server) or die "$@";
- $ldap->bind($admin,password=>$password);
- my $ldif = Net::LDAP::LDIF->new($dump_file,'w') ;
- $mesg = $ldap->search (
- base => "$base",
- filter => "(objectclass=*)"
- );
- $ldif->write_entry($mesg->entries) ;
- $ldap->unbind;
-}
diff --git a/gosa-core/contrib/opensides/nagios.README b/gosa-core/contrib/opensides/nagios.README
+++ /dev/null
@@ -1,20 +0,0 @@
-To use the nagios plugin
-
-1) Add the nagios schema to your schema directory
-
-2) Remove the comment in front of nagiosAccount in gosa.conf
-
-<!-- <plugin acl="default" class="nagiosAccount" icon="monitoring.png"
- path="plugins/personal/nagios" /> -->
-
-
-<!-- <nagios>
- <tab class="nagiosAccount" />
- </nagios> -->
-
-Benoit Mortier
-Guillaume Delecourt
-OpenSides October-November 2005
-
-
-
diff --git a/gosa-core/contrib/opensides/phpscheduleit.README b/gosa-core/contrib/opensides/phpscheduleit.README
+++ /dev/null
@@ -1,10 +0,0 @@
-To use the phpscheduleit connectivity extension
-
-1) Add the schema phpscheduleit.schema in your schema directory
-
-2) Remove the comment in front of phpscheduleitAccount in gosa.conf
-
-<!-- <tab class="phpscheduleitAccount" /> -->
-
-Guillaume Delecourt
-OpenSides November 2005
diff --git a/gosa-core/contrib/opensides/pptp.README b/gosa-core/contrib/opensides/pptp.README
+++ /dev/null
@@ -1,13 +0,0 @@
-To use the pptp connectivity extension
-
-1) Add the pptp.schema to your schema directory
-
-2) Remove the comment in front of pptpAccount in gosa.conf
-
-<!-- <tab class="pptpAccount" /> -->
-
-Guillaume Delecourt
-OpenSides November 2005
-
-
-
diff --git a/gosa-core/debian/docs b/gosa-core/debian/docs
index 222c768ee9299c4acc6f04c73197aa8656bf3499..8572e4121828b2559f713e8dd65de5a42e4d8aee 100644 (file)
--- a/gosa-core/debian/docs
+++ b/gosa-core/debian/docs
FAQ
+AUTHORS
DEVEL
README
INSTALL
index 32f50b1f360dd924702407944765937143416b56..741efa1e1f82b3a47262f056ffa5b66faa5199d8 100644 (file)
--- a/gosa-core/debian/install
+++ b/gosa-core/debian/install
setup /usr/share/gosa
debian/overrides-linda /usr/share/linda/overrides/gosa
debian/overrides-lintian /usr/share/lintian/overrides/gosa
+contrib/shells /etc/gosa
+contrib/resolutions /etc/gosa
+contrib/encodings /etc/gosa
+contrib/openldap/slapd.conf /usr/share/doc/gosa/slapd.conf-example