Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
On Sat, 23 Jun 2007 16:22:54 +0200 Per Qvindesland per@qvtech.cc wrote:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
Per -
I too posted such a question however, mine is a bit more involved. Getting decent, concise docs to LDAP and LDAP w/AD seems to be an endangered species on most any Linux list I am on.
Either nobody does it (and that seems NOT to be the case) or users just don't want to share the "secrets" on how to get it working, and working properly with Active Dir.
If someone points you to somewhere in private, please, please include me.
Thanks in advance.
Hello Chris,
Sure thing, there is a ldap smb integration script that is the only thing that I know about you can access it from here www.majen.net/smbldap but its for a full on smb/ldap integration which is not really needed for this, but it's there for anyone that needs/wants to use it.
Kind regards Per Qvindesland
Chris wrote:
On Sat, 23 Jun 2007 16:22:54 +0200 Per Qvindesland per@qvtech.cc wrote:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
Per -
I too posted such a question however, mine is a bit more involved. Getting decent, concise docs to LDAP and LDAP w/AD seems to be an endangered species on most any Linux list I am on.
Either nobody does it (and that seems NOT to be the case) or users just don't want to share the "secrets" on how to get it working, and working properly with Active Dir.
If someone points you to somewhere in private, please, please include me.
Thanks in advance.
Per Qvindesland schrieb:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
Where exactly is your difficulty, or asked differently, what does not work and which error messages do you get?
http://www.openldap.org/faq/data/cache/1005.html http://www.zytrax.com/books/ldap/ch5/step3.html http://www.brennan.id.au/20-Shared_Address_Book_LDAP.html http://www.onlamp.com/pub/a/onlamp/2003/03/27/ldap_ab.html http://www.feldt.com/work/projects/openLDAP/
Can't be that all instructions fail. Granted, openLDAP or LDAP in general is a complex story and some understanding required to get it properly running. The URLs I quoted seem to explain the settings verbosely.
Cheers
Alexander
I just want to say thanks to everyone that helped me, I finally got it working after a lot of google.
The site that helped me a lot was www.yolinux.com, very straight forward and simple to understand.
Kind regards Per Qvindesland
Alexander Dalloz wrote:
Per Qvindesland schrieb:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
Where exactly is your difficulty, or asked differently, what does not work and which error messages do you get?
http://www.openldap.org/faq/data/cache/1005.html http://www.zytrax.com/books/ldap/ch5/step3.html http://www.brennan.id.au/20-Shared_Address_Book_LDAP.html http://www.onlamp.com/pub/a/onlamp/2003/03/27/ldap_ab.html http://www.feldt.com/work/projects/openLDAP/
Can't be that all instructions fail. Granted, openLDAP or LDAP in general is a complex story and some understanding required to get it properly running. The URLs I quoted seem to explain the settings verbosely.
Cheers
Alexander
Am Samstag, den 23.06.2007, 16:22 +0200 schrieb Per Qvindesland:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Yes.
My own fedora-ldap-almost-howto, hope being useful to you, if you improve it, please return it to the list, thnx. My job's domain ist padep.org.bo, change your appropriate, and so with the rest. The evolution part is up to you, but is very easy:
- Install w/yum:
# yum install php-ldap openldap openldap-clients openldap-servers
- Configure to get this files:
# cat /etc/ldap.conf |grep "^base"
base dc=padep,dc=org,dc=bo
# slappasswd New password: blahblah Re-enter new password: blahblah {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
# cat /etc/openldap/slapd.conf | grep "^suffix|^root" suffix "dc=padep,dc=org,dc=bo" rootdn "cn=admin,dc=padep,dc=org,dc=bo" rootpw {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
- Start service:
# service ldap start Checking configuration files for slapd: bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=padep,dc=org,dc=bo. config file testing succeeded [ OK ] Starting slapd: [ OK ]
- Create a basic .ldif file:
# cat /etc/openldap/padep.ldif dn: dc=padep,dc=org,dc=bo objectclass: dcObject objectclass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectclass: organizationalRole cn: admin
dn:ou=Group,dc=padep,dc=org,dc=bo objectclass: top objectclass: organizationalUnit ou: Group
dn:ou=People,dc=padep,dc=org,dc=bo objectclass: top objectclass: organizationalUnit ou: People
- load ldif file to db:
# ldapadd -x -D "cn=admin,dc=padep,dc=org,dc=bo" -W -f /etc/openldap/padep.ldif
Enter LDAP Password: blahblah adding new entry "dc=padep,dc=org,dc=bo" adding new entry "cn=admin,dc=padep,dc=org,dc=bo" adding new entry "ou=Group,dc=padep,dc=org,dc=bo" adding new entry "ou=People,dc=padep,dc=org,dc=bo"
- Install phpLDAPadmin, visit:
http://your.server.com./pla/htdocs/index.php; enter with
cn=admin,dc=padep,dc=org,dc=bo /pass=blahblah
- Head of my ldap file, obtained with phpLDAPadmin:
version: 1
# LDIF Export for: dc=padep,dc=org,dc=bo # Generated by phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) on March 8, 2007 3:54 pm # Server: My LDAP Server (127.0.0.1) # Search Scope: sub # Search Filter: (objectClass=*) # Total Entries: 96
dn: dc=padep,dc=org,dc=bo objectClass: dcObject objectClass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectClass: organizationalRole cn: admin
dn: ou=c1,dc=padep,dc=org,dc=bo ou: c1 objectClass: organizationalUnit objectClass: top
dn: cn=benedicto.carani,ou=c1,dc=padep,dc=org,dc=bo cn: benedicto.carani givenName: Benedicto mail: benedicto.carani@padep.org.bo o: Padep objectClass: inetOrgPerson objectClass: top ou: c1 postalCode: 02 sn: Carani
dn: cn=boris.rodriguez,ou=c1,dc=padep,dc=org,dc=bo cn: boris.rodriguez givenName: Boris mail: boris.rodriguez@padep.org.bo o: Padep objectClass: inetOrgPerson objectClass: top ou: c1 postalCode: 02 sn: Rodriguez
- PHP exapmle filtering cn=a*
<?php echo "<h3>LDAP query test</h3>"; echo "Connecting ..."; $ds=ldap_connect("localhost"); // must be a valid LDAP server! echo "connect result is " . $ds . "<br />"; if ($ds) { echo "Binding ..."; $r=ldap_bind($ds); echo "Bind result is " . $r . "<br />"; echo "Searching for (cn=a*) ..."; $sr=ldap_search($ds, "dc=padep,dc=org,dc=bo", "cn=a*"); echo "Search result is ".$sr."<br>"; echo "Number of entires returned is " . ldap_count_entries($ds, $sr) . "<br />"; echo "Getting entries ...<p>"; $info = ldap_get_entries($ds, $sr); echo "Data for " . $info["count"] . " items returned:<p>"; for ($i=0; $i<$info["count"]; $i++) { echo "dn is: " . $info[$i]["dn"] . "<br />"; echo "first cn entry is: " . $info[$i]["cn"][0] . "<br />"; echo "first email entry is: " . $info[$i]["mail"][0] . "<br /><hr />"; } echo "Closing connection"; ldap_close($ds);
} else { echo "<h4>Unable to connect to LDAP server</h4>"; } ?>
LDAP query test Connecting ...connect result is Resource id #2 Binding ...Bind result is 1 Searching for (sn=S*) ...Search result is Resource id #3 Number of entires returned is 6 Getting entries ...
Data for 6 items returned:
dn is: cn=admin,dc=padep,dc=org,dc=bo first cn entry is: admin first email entry is:
dn is: cn=aidee.suarez,ou=c3,dc=padep,dc=org,dc=bo first cn entry is: aidee.suarez first email entry is: aidee.suarez@padep.org.bo
...
Closing connection
-------------- testing command:
# ldapsearch -x -b 'dc=padep,dc=org,dc=bo' '(objectclass=*)'
Good luck! ---------------------------------------------- Rodolfo Alcazar - rodolfo.alcazar@padep.org.bo 591-70656800, -22417628, LA PAZ, BOLIVIA otbits.blogspot.com / counter.li.org: #367962 ---------------------------------------------- - I'm Bender, baby! Please insert liquor!
Howdy Rodolfo,
That's absolutely correct the only thing that I found out was easier was to install phpldapadmin before loading any ldif, that way I could load ldif properly since ldap said that it had loaded the ldif but infact when I checked it had not, odd really to receive BS from something as stable as ldap, something that took me a few hours to figure out, a few hours I wouldn't mind getting back :)
Regards Per Qvindesland
On Sunday 24 June 2007 05:47:47 pm Rodolfo Alcazar Portillo wrote:
Am Samstag, den 23.06.2007, 16:22 +0200 schrieb Per Qvindesland:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Yes.
My own fedora-ldap-almost-howto, hope being useful to you, if you improve it, please return it to the list, thnx. My job's domain ist padep.org.bo, change your appropriate, and so with the rest. The evolution part is up to you, but is very easy:
- Install w/yum:
# yum install php-ldap openldap openldap-clients openldap-servers
- Configure to get this files:
# cat /etc/ldap.conf |grep "^base"
base dc=padep,dc=org,dc=bo
# slappasswd New password: blahblah Re-enter new password: blahblah {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
# cat /etc/openldap/slapd.conf | grep "^suffix|^root" suffix "dc=padep,dc=org,dc=bo" rootdn "cn=admin,dc=padep,dc=org,dc=bo" rootpw {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
- Start service:
# service ldap start Checking configuration files for slapd: bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=padep,dc=org,dc=bo. config file testing succeeded [ OK ] Starting slapd: [ OK ]
- Create a basic .ldif file:
# cat /etc/openldap/padep.ldif dn: dc=padep,dc=org,dc=bo objectclass: dcObject objectclass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectclass: organizationalRole cn: admin
dn:ou=Group,dc=padep,dc=org,dc=bo objectclass: top objectclass: organizationalUnit ou: Group
dn:ou=People,dc=padep,dc=org,dc=bo objectclass: top objectclass: organizationalUnit ou: People
- load ldif file to db:
# ldapadd -x -D "cn=admin,dc=padep,dc=org,dc=bo" -W -f /etc/openldap/padep.ldif
Enter LDAP Password: blahblah adding new entry "dc=padep,dc=org,dc=bo" adding new entry "cn=admin,dc=padep,dc=org,dc=bo" adding new entry "ou=Group,dc=padep,dc=org,dc=bo" adding new entry "ou=People,dc=padep,dc=org,dc=bo"
- Install phpLDAPadmin, visit:
http://your.server.com./pla/htdocs/index.php; enter with
cn=admin,dc=padep,dc=org,dc=bo /pass=blahblah
- Head of my ldap file, obtained with phpLDAPadmin:
version: 1
# LDIF Export for: dc=padep,dc=org,dc=bo # Generated by phpLDAPadmin ( http://phpldapadmin.sourceforge.net/ ) on March 8, 2007 3:54 pm # Server: My LDAP Server (127.0.0.1) # Search Scope: sub # Search Filter: (objectClass=*) # Total Entries: 96
dn: dc=padep,dc=org,dc=bo objectClass: dcObject objectClass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectClass: organizationalRole cn: admin
dn: ou=c1,dc=padep,dc=org,dc=bo ou: c1 objectClass: organizationalUnit objectClass: top
dn: cn=benedicto.carani,ou=c1,dc=padep,dc=org,dc=bo cn: benedicto.carani givenName: Benedicto mail: benedicto.carani@padep.org.bo o: Padep objectClass: inetOrgPerson objectClass: top ou: c1 postalCode: 02 sn: Carani
dn: cn=boris.rodriguez,ou=c1,dc=padep,dc=org,dc=bo cn: boris.rodriguez givenName: Boris mail: boris.rodriguez@padep.org.bo o: Padep objectClass: inetOrgPerson objectClass: top ou: c1 postalCode: 02 sn: Rodriguez
- PHP exapmle filtering cn=a*
<?php echo "<h3>LDAP query test</h3>"; echo "Connecting ..."; $ds=ldap_connect("localhost"); // must be a valid LDAP server! echo "connect result is " . $ds . "<br />"; if ($ds) { echo "Binding ..."; $r=ldap_bind($ds); echo "Bind result is " . $r . "<br />"; echo "Searching for (cn=a*) ..."; $sr=ldap_search($ds, "dc=padep,dc=org,dc=bo", "cn=a*"); echo "Search result is ".$sr."<br>"; echo "Number of entires returned is " . ldap_count_entries($ds, $sr) . "<br />"; echo "Getting entries ...<p>"; $info = ldap_get_entries($ds, $sr); echo "Data for " . $info["count"] . " items returned:<p>"; for ($i=0; $i<$info["count"]; $i++) { echo "dn is: " . $info[$i]["dn"] . "<br />"; echo "first cn entry is: " . $info[$i]["cn"][0] . "<br />"; echo "first email entry is: " . $info[$i]["mail"][0] . "<br /><hr />"; } echo "Closing connection"; ldap_close($ds); } else { echo "<h4>Unable to connect to LDAP server</h4>"; } ?>
LDAP query test Connecting ...connect result is Resource id #2 Binding ...Bind result is 1 Searching for (sn=S*) ...Search result is Resource id #3 Number of entires returned is 6 Getting entries ...
Data for 6 items returned:
dn is: cn=admin,dc=padep,dc=org,dc=bo first cn entry is: admin first email entry is:
dn is: cn=aidee.suarez,ou=c3,dc=padep,dc=org,dc=bo first cn entry is: aidee.suarez first email entry is: aidee.suarez@padep.org.bo
...
Closing connection
testing command:
# ldapsearch -x -b 'dc=padep,dc=org,dc=bo' '(objectclass=*)'
Good luck!
Rodolfo Alcazar - rodolfo.alcazar@padep.org.bo 591-70656800, -22417628, LA PAZ, BOLIVIA otbits.blogspot.com / counter.li.org: #367962
- I'm Bender, baby! Please insert liquor!
Rodolfo Alcazar Portillo wrote:
My own fedora-ldap-almost-howto, hope being useful to you, if you improve it, please return it to the list, thnx. My job's domain ist padep.org.bo, change your appropriate, and so with the rest. The evolution part is up to you, but is very easy:
- Install w/yum:
# yum install php-ldap openldap openldap-clients openldap-servers
- Configure to get this files:
# cat /etc/ldap.conf |grep "^base"
base dc=padep,dc=org,dc=bo
# slappasswd New password: blahblah Re-enter new password: blahblah {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
# cat /etc/openldap/slapd.conf | grep "^suffix|^root" suffix "dc=padep,dc=org,dc=bo" rootdn "cn=admin,dc=padep,dc=org,dc=bo" rootpw {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
The trouble with this, in my eyes, is that you have given no explanation of why you make the choices you do in creating your conf files.
This is in fact what I find off-putting in almost all ldap documentation.
Why for example do you say suffix "dc=padep,dc=org,dc=bo" Could you equally well have said suffix "dc=padep.org.bo" ? [And what does "suffix" mean, anyway?]
Must your choice be the address of your LDAP server?
Incidentally, do you actually need ldap.conf ? Half the documents I have looked at only consider slapd.conf .
In any case there should be some explanation of the purposes of these 2 different conf files.
As far as I can make out - and if I am right I am completely baffled why no LDAP tutorial explains this clearly - the entries in an LDAP directory are represented by nodes on a tree, and the rather bizarre entries like the above are strange ways of specifying these nodes, eg bo->org->padep in your case, with bo at the root.
# service ldap start Checking configuration files for slapd: bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=padep,dc=org,dc=bo. config file testing succeeded
Don't you think this warning calls for at least some explanation on your part? I would think twice before running software if I had been told that something is missing.
- Create a basic .ldif file:
# cat /etc/openldap/padep.ldif dn: dc=padep,dc=org,dc=bo objectclass: dcObject objectclass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectclass: organizationalRole cn: admin
Surely this kind of gobbledygook calls for some explanation? What does it mean when you say objectclass: dcObject objectclass: organization ? As far as I can see, it means that the entry in question will have the attributes specified (where?) in the definitions of dcObject and organization, ie the type of the entry is the union of the objectlass'es given.
Is that correct? Again, if it is then I am completely baffled that none of the tutorials mention what seems to me essential to an understanding of the file in question.
In my case, I'm still pondering the choice between LDAP and vCard for a LAN-wide address-book. vCard has the great advantage in my eyes that the format is clearly defined, with an XML DTD definition if desired.
From a practical point of view, it also seems the format used
in mobile phones, which is quite significant.
The disadvantage of vCard, as far as I can see, is that one would have to keep a copy on each machine.
Timothy Murphy wrote:
Rodolfo Alcazar Portillo wrote:
My own fedora-ldap-almost-howto, hope being useful to you, if you improve it, please return it to the list, thnx. My job's domain ist padep.org.bo, change your appropriate, and so with the rest. The evolution part is up to you, but is very easy:
- Install w/yum:
# yum install php-ldap openldap openldap-clients openldap-servers
- Configure to get this files:
# cat /etc/ldap.conf |grep "^base"
base dc=padep,dc=org,dc=bo
# slappasswd New password: blahblah Re-enter new password: blahblah {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
# cat /etc/openldap/slapd.conf | grep "^suffix|^root" suffix "dc=padep,dc=org,dc=bo" rootdn "cn=admin,dc=padep,dc=org,dc=bo" rootpw {SSHA}g5/QcoAmy54qGOsks04cyXda3PVa2Jxg
The trouble with this, in my eyes, is that you have given no explanation of why you make the choices you do in creating your conf files.
This is in fact what I find off-putting in almost all ldap documentation.
Why for example do you say suffix "dc=padep,dc=org,dc=bo" Could you equally well have said suffix "dc=padep.org.bo" ? [And what does "suffix" mean, anyway?]
Must your choice be the address of your LDAP server?
Incidentally, do you actually need ldap.conf ? Half the documents I have looked at only consider slapd.conf .
In any case there should be some explanation of the purposes of these 2 different conf files.
As far as I can make out - and if I am right I am completely baffled why no LDAP tutorial explains this clearly - the entries in an LDAP directory are represented by nodes on a tree, and the rather bizarre entries like the above are strange ways of specifying these nodes, eg bo->org->padep in your case, with bo at the root.
# service ldap start Checking configuration files for slapd: bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=padep,dc=org,dc=bo. config file testing succeeded
Don't you think this warning calls for at least some explanation on your part? I would think twice before running software if I had been told that something is missing.
- Create a basic .ldif file:
# cat /etc/openldap/padep.ldif dn: dc=padep,dc=org,dc=bo objectclass: dcObject objectclass: organization o: Example Company dc: padep
dn: cn=admin,dc=padep,dc=org,dc=bo objectclass: organizationalRole cn: admin
Surely this kind of gobbledygook calls for some explanation? What does it mean when you say objectclass: dcObject objectclass: organization ? As far as I can see, it means that the entry in question will have the attributes specified (where?) in the definitions of dcObject and organization, ie the type of the entry is the union of the objectlass'es given.
Is that correct? Again, if it is then I am completely baffled that none of the tutorials mention what seems to me essential to an understanding of the file in question.
In my case, I'm still pondering the choice between LDAP and vCard for a LAN-wide address-book. vCard has the great advantage in my eyes that the format is clearly defined, with an XML DTD definition if desired.
From a practical point of view, it also seems the format used
in mobile phones, which is quite significant.
The disadvantage of vCard, as far as I can see, is that one would have to keep a copy on each machine.
Is this useful? http://www.zytrax.com/books/ldap/
Check out onlamp.com search for ldap
k
On 6/23/07, Per Qvindesland per@qvtech.cc wrote:
Hello List,
Does anyone know about a SIMPLE howto to configure ldap to share address book for email clients? after having googled for hours I can find plenty but their one of two 1. not simple or 2. just don't work so I am hoping that someone here can point me in the right direction.
Kind regards Per Qvindesland
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list