We have a Postgresql server open to many different people at our organization. In order to add a ldap authentication you can add these 3 lines to your current pg_hba.conf file: host all username    127.0.0.1/32       ldap ldapserver=”ourserver.uib.no” ldapbasedn=”ou=people,dc=uib,dc=no” host all username    129.177.XXX.YYY/32 ldap ldapserver=”ourserver.uib.no” ldapbasedn=”ou=people,dc=uib,dc=no” local all username                      ldap ldapserver=”ourserver.uib.no” ldapbasedn=”ou=people,dc=uib,dc=no”

We needed to collect “Place” information per user from our LDAP server. The problem was that the description of the “Place” came out strangely encoded whenever it contained one of the norwegian characters æ,ø or å. The ldap command: ldapsearch -x -H ldap://ourldapserver.uib.no x121Address=XXXXXX where XXXXXX is the “place” code, gave a place description that

Search for information from a ldap server: Log in to server with: ssh servernavn Then type the command: ldapsearch -x -H ldap://ldapservername.uib.no uid=userid ldapsearch -x -H ldap://ldapservername.uib.no departmentnumber=XXXXXX where XXXXXX is placecode