summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8c3647)
raw | patch | inline | side by side (parent: d8c3647)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 14:45:55 +0000 (14:45 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Apr 2008 14:45:55 +0000 (14:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10247 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/glpi/contrib/glpi.README | [new file with mode: 0644] | patch | blob |
gosa-plugins/nagios/contrib/README.nagios | [new file with mode: 0644] | patch | blob |
gosa-plugins/nagios/contrib/goNagios.pl | [new file with mode: 0755] | patch | blob |
gosa-plugins/openxchange/README.openxchange | [new file with mode: 0644] | patch | blob |
gosa-plugins/phpscheduleit/contrib/phpscheduleit.README | [new file with mode: 0644] | patch | blob |
gosa-plugins/pptp/contrib/README.pptp | [new file with mode: 0644] | patch | blob |
gosa-plugins/samba/contrib/fix_munged | [new file with mode: 0755] | patch | blob |
gosa-plugins/samba/contrib/goSamba.pl | [new file with mode: 0755] | patch | blob |
diff --git a/gosa-plugins/glpi/contrib/glpi.README b/gosa-plugins/glpi/contrib/glpi.README
--- /dev/null
@@ -0,0 +1,13 @@
+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-plugins/nagios/contrib/README.nagios b/gosa-plugins/nagios/contrib/README.nagios
--- /dev/null
@@ -0,0 +1,20 @@
+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-plugins/nagios/contrib/goNagios.pl b/gosa-plugins/nagios/contrib/goNagios.pl
--- /dev/null
@@ -0,0 +1,391 @@
+#!/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-plugins/openxchange/README.openxchange b/gosa-plugins/openxchange/README.openxchange
--- /dev/null
@@ -0,0 +1,437 @@
+### Small tutorial for use GOsa with open-xchange ###
+
+Once installed open-xchange (http://www.open-xchange.org) and php4-pgsql
+module we must do some changes to get open-xchange running with GOsa.
+
+- php.ini must have extension=pg_sql.so
+
+- The webserver must have access to the Postgresql server.
+
+- In the connectivity section of gosa.conf must have something like this:
+ <tab class="oxchangeAccount"
+ pghost="server"
+ pguser="openexchange"
+ pgpasswd="test"
+ pgdbname="openexchange"
+ />
+
+
+
+We suppose that openxchage is installed in /usr/local/openxchange,
+and the base for GOsa ldap tree is dc=example,dc=org
+
+
+- Make changes to admintools.conf (/usr/local/openxchange/etc/admintools.conf):
+
+OXBASE="dc=example,dc=org"
+OX_LEAF="$OXBASE"
+# Where are the OX Users
+USER_BASEDN="ou=people,$OX_LEAF"
+# Where are the OX Groups
+GROUP_BASEDN="ou=groups,$OX_LEAF"
+# Where are the OX Resources
+RESOURCES_BASEDN="ou=Resources,ou=ResourceObjects,ou=OxObjects,$OX_LEAF"
+# Where are the OX Resource Groups
+RESOURCE_GROUPS_BASEDN="ou=ResourceGroups,ou=ResourceObjects,ou=OxObjects,$OX_LEAF"
+# Where is the Global Adressbook
+GLOBAL_ADDRESSBOOKDN="o=AddressBook,ou=OxObjects,$OX_LEAF"
+# where are the adressbook admins
+GLOBAL_ADDRESSBOOK_ADMINSDN="cn=AddressAdmins,ou=OxObjects,$GLOBAL_ADDRESSBOOKDN"
+
+- Make changes in login.pm (usually in /usr/lib/cgi-bin/login.pm):
+my $ldap_userBase = 'ou=Users,ou=OxObjects,';
+to
+my $ldap_userBase = 'ou=people,';
+
+- Put the Base in ldap.conf (/usr/local/openxchange/etc/groupware/ldap.conf)
+BASE dc=example,dc=org
+
+- If you are using as GOsa dnmode "uid", You must change in ldap.properties
+(/usr/local/openxchange/etc/groupware/ldap.properties):
+
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeuserCountryName=userCountry
+ to
+com.openexchange.groupware.ldap.OXUserObjectAttributeuserCountryName=st
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeimapServerName=imapServer
+ to
+com.openexchange.groupware.ldap.OXUserObjectAttributeimapServerName=gosaMailServer
+
+com.openexchange.groupware.ldap.OXUserObjectAttributesmtpServerName=smtpServer
+ to
+com.openexchange.groupware.ldap.OXUserObjectAttributesmtpServerName=gosaMailServer
+
+com.openexchange.groupware.ldap.userBaseDN=ou\u003DUsers,ou\u003DOxObjects
+to
+com.openexchange.groupware.ldap.userBaseDN=ou\u003Dpeople
+
+
+
+- If you are using as GOsa dnmode "cn", the ldap.properties
+(/usr/local/openxchange/etc/groupware/ldap.properties)
+configuration of open-xchange must be like this:
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributebusinessCategoryName=businessCategory
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributecnName=cn
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeCountryName=c
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributedescriptionName=description
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributedisplayNameName=displayName
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeemployeeNumberName=employeeNumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeemployeeTypeName=employeeType
+
+com.openexchange.groupware.ldap.OXUserObjectAttributecoName=co
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributehomePhoneName=homePhone
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributehomePostalAddressName=homePostalAddress
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeInfoName=info
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeinitialsName=initials
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeinternationaliSDNNumberName=internationaliSDNNumber
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeIPPhoneName=IPPhone
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeotherfacsimiletelephonenumberName=otherfacsimiletelephonenumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeroomNumberName=roomNumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributetelexNumberName=telexNumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeuidName=uid
+
+com.openexchange.groupware.ldap.inetOrgPersonClassName=inetOrgPerson
+
+com.openexchange.groupware.ldap.OXUserObjectAttributebirthDayName=birthDay
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeDistributionListName=OXUserDistributionList
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeAnniversaryName=OXUserAnniversary
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeBranchesName=OXUserBranches
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeCategoriesName=OXUserCategories
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeChildrenName=OXUserChildren
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeCityName=OXUserCity
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeCommentName=OXUserComment
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeComRegName=OXUserComReg
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeEmail2Name=OXUserEmail2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeEmail3Name=OXUserEmail3
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeInstantMessenger2Name=OXUserInstantMessenger2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeInstantMessengerName=OXUserInstantMessenger
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeMaritalStatusName=OXUserMaritalStatus
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeNickNameName=OXUserNickName
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeOtherCityName=OXUserOtherCity
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeOtherCountryName=OXUserOtherCountry
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeOtherPostalCodeName=OXUserOtherPostalCode
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeOtherStateName=OXUserOtherState
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeOtherStreetName=OXUserOtherStreet
+
+com.openexchange.groupware.ldap.OXUserObjectAttributePositionName=OXUserPosition
+
+com.openexchange.groupware.ldap.OXUserObjectAttributePostalCodeName=OXUserPostalCode
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeProfessionName=OXUserProfession
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeSalesVolumeName=OXUserSalesVolume
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeSpouseNameName=OXUserSpouseName
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeStateName=OXUserState
+
+com.openexchange.groupware.ldap.OXUserObjectAttributesuffixName=OXUserSuffix
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTaxIDName=OXUserTaxID
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleAssistantName=OXUserTeleAssistant
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleBusiness2Name=OXUserTeleBusiness2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleCallbackName=OXUserTeleCallback
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleCarName=OXUserTeleCar
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleCompanyName=OXUserTeleCompany
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleFax2Name=OXUserTeleFax2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleHome2Name=OXUserTeleHome2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleMobile2Name=OXUserTeleMobile2
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleOtherName=OXUserTeleOther
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTelePrimaryName=OXUserTelePrimary
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleRadioName=OXUserTeleRadio
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeTeleTTYName=OXUserTeleTTY
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeurlName=url
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef01Name=OXUserUserUndef01
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef02Name=OXUserUserUndef02
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef03Name=OXUserUserUndef03
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef04Name=OXUserUserUndef04
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef05Name=OXUserUserUndef05
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef06Name=OXUserUserUndef06
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef07Name=OXUserUserUndef07
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef08Name=OXUserUserUndef08
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef09Name=OXUserUserUndef09
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef10Name=OXUserUserUndef10
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef11Name=OXUserUserUndef11
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef12Name=OXUserUserUndef12
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef13Name=OXUserUserUndef13
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef14Name=OXUserUserUndef14
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef15Name=OXUserUserUndef15
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef16Name=OXUserUserUndef16
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef17Name=OXUserUserUndef17
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef18Name=OXUserUserUndef18
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef19Name=OXUserUserUndef19
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeUserUndef20Name=OXUserUserUndef20
+
+com.openexchange.groupware.ldap.OXUserObjectClassName=OXUserObject
+
+com.openexchange.groupware.ldap.AllContactUIDSearch=(&(objectClass\u003DinetOrgPerson)(objectClass\u003DOXUserObject))
+
+!com.openexchange.groupware.ldap.AllContactUIDSearchScope=1
+
+com.openexchange.groupware.ldap.credentialsBaseDN=[credentialsBaseDN]
+
+com.openexchange.groupware.ldap.credentialsDN=cn\u003D[uid],[userBaseDN],[credentialsBaseDN]
+
+com.openexchange.groupware.ldap.groupOfNamesAttributememberName=member
+
+com.openexchange.groupware.ldap.AddressAdminsDN=cn\u003DAddressAdmins,[globalAddressBookBaseDN]
+
+com.openexchange.groupware.ldap.globalAddressBookBaseDN=o\u003DAddressBook
+
+com.openexchange.groupware.ldap.GlobalAddressBookEntryDN=cn\u003D[contactid],[globalAddressBookBaseDN]
+
+com.openexchange.groupware.ldap.InternalUsersForeSureNameUIDPatternSearchFilter=(&(objectClass\u003DinetOrgPerson)(objectClass\u003DOXUserObject)(|(sn\u003D[pattern])(givenname\u003D[pattern])(cn\u003D[pattern]))(mailEnabled\u003Dok))
+
+com.openexchange.groupware.ldap.InternalUsersStartingLetterSearchFilter=(&(objectClass\u003DinetOrgPerson)(objectClass\u003DOXUserObject)(sn\u003D[letter]*)(mailEnabled\u003Dok))
+
+com.openexchange.groupware.ldap.UserAddressBookEntryDN=cn\u003D[contactid],[UserAddressBookDN]
+
+com.openexchange.groupware.ldap.localDomainsBaseDN=ou\u003DDNSObjects,ou\u003DAdminObjects
+
+com.openexchange.groupware.ldap.OXVDomainAttributedomainNameName=domainName
+
+com.openexchange.groupware.ldap.LocalDomainsSearchFilter=(&(objectClass\u003DOXVDomainObject)(MTALocaldomain\u003Dtrue))
+
+com.openexchange.groupware.ldap.OXIMAPFolderAttributefnName=fn
+
+com.openexchange.groupware.ldap.sharedFolderBaseDN=ou\u003DSharedFolder
+
+com.openexchange.groupware.ldap.SharedFolderSearchFilter=(&(objectclass\u003DOXIMAPFolderObject)(mailenabled\u003Dok))
+
+!com.openexchange.groupware.ldap.sharedFolderSearchScope=1
+
+com.openexchange.groupware.ldap.OXResourceGroupAttributeresourceGroupAvailableName=resourceGroupAvailable
+
+com.openexchange.groupware.ldap.OXResourceGroupAttributeresourceGroupMemberName=resourceGroupMember
+
+com.openexchange.groupware.ldap.OXResourceGroupAttributeresourceGroupNameName=resourceGroupName
+
+com.openexchange.groupware.ldap.ResourceGroupDN=resourceGroupName\u003D[group],[resourceGroupBaseDN]
+
+com.openexchange.groupware.ldap.ResourceGroupPatternSearchFilter=(&(objectclass\u003DOXResourceGroupObject)(resourceGroupName\u003D[pattern]))
+
+com.openexchange.groupware.ldap.ResourceGroupSearchFilter=(objectclass\u003DOXResourceGroupObject)
+
+!com.openexchange.groupware.ldap.ResourceGroupSearchScope=1
+
+com.openexchange.groupware.ldap.OXResourceAttributeresourceNameName=resourceName
+
+#Where are the resources?
+com.openexchange.groupware.ldap.resourceBaseDN=ou\u003DResources,ou\u003DResourceObjects
+
+com.openexchange.groupware.ldap.ResourceDN=resourceName\u003D[resource],[resourceBaseDN]
+
+#Where are the resource groups?
+com.openexchange.groupware.ldap.resourceGroupBaseDN=ou\u003DResourceGroups,ou\u003DResourceObjects
+
+#Searches resources with the a pattern.
+com.openexchange.groupware.ldap.ResourcePatternSearchFilter=(&(objectclass\u003DOXResourceObject)(resourceName\u003D[pattern]))
+
+!com.openexchange.groupware.ldap.ResourceSearchScope=1
+
+com.openexchange.groupware.ldap.DNForDefaultMail=cn\u003Dmailadmin,[userBaseDN]
+
+com.openexchange.groupware.ldap.Factory.AuthenticationSupport=com.openexchange.groupware.ldap.DefaultAuthenticationSupport
+
+com.openexchange.groupware.ldap.Factory.ContactSupport=com.openexchange.groupware.ldap.DefaultContactSupport
+
+com.openexchange.groupware.ldap.Factory.MailSupport=com.openexchange.groupware.ldap.DefaultMailSupport
+
+com.openexchange.groupware.ldap.Factory.ResourcesHandle=com.openexchange.groupware.ldap.DefaultResourcesHandle
+
+#Class, that implementes UserGroupHandle, ResourcesHandle
+com.openexchange.groupware.ldap.Factory.UserGroupHandle=com.openexchange.groupware.ldap.DefaultUserGroupHandle
+
+#Where to search for groups?
+com.openexchange.groupware.ldap.groupBaseDN=ou\u003DGroups
+
+#Complete dn of a group.
+com.openexchange.groupware.ldap.GroupDN=cn\u003D[gid],[groupBaseDN]
+
+com.openexchange.groupware.ldap.GroupSearchFilter=(objectclass\u003DposixGroup)
+
+#Searches all groups for the user
+com.openexchange.groupware.ldap.GroupsForUserSearchFilter=(&(objectclass\u003DposixGroup)(memberUid\u003D[uid]))
+
+com.openexchange.groupware.ldap.GroupsPatternSearchFilter=(&(objectclass\u003DposixGroup)(cn\u003D[pattern]))
+
+!com.openexchange.groupware.ldap.GroupSearchScope=1
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributefacsimileName=facsimileTelephoneNumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributegivenNameName=givenName
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributelabeledURIName=labeledURI
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributelName=l
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributemailName=mail
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributemobileName=mobile
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeoName=o
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributeouName=ou
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributepagerName=pager
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributepostalCodeName=postalCode
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributepreferredLanguageName=preferredLanguage
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributesnName=sn
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributestName=st
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributestreetName=street
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributetelephoneNumberName=telephoneNumber
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributetitleName=title
+
+com.openexchange.groupware.ldap.OXUserObjectAttributealiasName=alias
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeappointmentDaysName=OXAppointmentDays
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeimapServerName=gosaMailServer
+
+com.openexchange.groupware.ldap.OXUserObjectAttributemailDomainName=mailDomain
+
+com.openexchange.groupware.ldap.OXUserObjectAttributesmtpServerName=gosaMailServer
+
+com.openexchange.groupware.ldap.OXUserObjectAttributetaskDaysName=OXTaskDays
+
+com.openexchange.groupware.ldap.OXUserObjectAttributetimeZoneName=OXTimeZone
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeuserCountryName=st
+
+com.openexchange.groupware.ldap.OXUserObjectAttributevaddressName=vaddress
+
+com.openexchange.groupware.ldap.posixAccountAttributecnName=cn
+
+com.openexchange.groupware.ldap.posixAccountAttributeuidName=uid
+
+com.openexchange.groupware.ldap.posixGroupAttributecnName=cn
+
+com.openexchange.groupware.ldap.posixGroupAttributememberUidName=memberUid
+
+com.openexchange.groupware.ldap.UserAddressBookDN=ou\u003Daddr,cn\u003D[uid],[userBaseDN]
+
+com.openexchange.groupware.ldap.UserAttributeOpenLDAPaciName=OpenLDAPaci
+
+com.openexchange.groupware.ldap.userBaseDN=ou\u003Dpeople
+
+#DN to the user object
+com.openexchange.groupware.ldap.UserDN=cn\u003D[uid],[userBaseDN]
+
+com.openexchange.groupware.ldap.UsersCNPatternSearchFilter=(&(objectclass\u003DposixAccount)(objectClass\u003DinetOrgPerson)(|(cn\u003D[pattern])(givenName\u003D[pattern])(cn\u003D[pattern])))
+
+com.openexchange.groupware.ldap.UserSearchFilter=(&(cn\u003D[uid])(objectClass\u003DOXUserObject))
+
+!com.openexchange.groupware.ldap.UserSearchScope=1
+
+com.openexchange.groupware.ldap.UsersForeSureNamePatternSearchFilter=(&(objectclass\u003DposixAccount)(|(givenName\u003D[pattern])(sn\u003D[pattern])))
+
+com.openexchange.groupware.ldap.UsersForeSureNameUIDPatternSearchFilter=(&(objectclass\u003DposixAccount)(objectClass\u003DinetOrgPerson)(|(givenName\u003D[pattern])(sn\u003D[pattern])(cn\u003D[pattern])))
+
+com.openexchange.groupware.ldap.UsersPatternSearchFilter=(&(objectclass\u003DposixAccount)(cn\u003D[pattern]))
+
+#Define the objectClasses an user object should belong to if you are performing pattern searches.
+com.openexchange.groupware.ldap.UsersPatternSearchObjectClasses=posixAccount,inetOrgPerson,OXUserObject
+
+com.openexchange.groupware.ldap.GlobalAddressBookSearchScope=1
+
+com.openexchange.groupware.ldap.inetOrgPersonAttributejpegPhotoName=jpegPhoto
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeDayViewEndTimeName=OXDayViewEndTime
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeDayViewStartTimeName=OXDayViewStartTime
+
+com.openexchange.groupware.ldap.OXUserObjectAttributeDayViewIntervalName=OXDayViewInterval
+
+!com.openexchange.groupware.ldap.LocalDomainsSearchScope=1
+
+
+
+
+
+
+This configuration is based in documentation gets from
+http://www.open-xchange.org/oxwiki/
+
+TODO:
+- more testing
+- check cn configuration
+- check addressbook
+- subtree support
+
diff --git a/gosa-plugins/phpscheduleit/contrib/phpscheduleit.README b/gosa-plugins/phpscheduleit/contrib/phpscheduleit.README
--- /dev/null
@@ -0,0 +1,10 @@
+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-plugins/pptp/contrib/README.pptp b/gosa-plugins/pptp/contrib/README.pptp
--- /dev/null
@@ -0,0 +1,13 @@
+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-plugins/samba/contrib/fix_munged b/gosa-plugins/samba/contrib/fix_munged
--- /dev/null
@@ -0,0 +1,95 @@
+#!/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-plugins/samba/contrib/goSamba.pl b/gosa-plugins/samba/contrib/goSamba.pl
--- /dev/null
@@ -0,0 +1,162 @@
+#!/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;
+}