Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:services:network_services:openldap:start [2016/01/14 12:43] – [Other measures] totto | en:services:network_services:openldap:start [2016/01/14 12:44] (current) – [Other Measures] totto | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======OpenLDAP====== | ||
+ | ===== Connecting UNIX/Linux Systems to the GWDG's User Account Management ===== | ||
+ | |||
+ | ==== Prerequisites ==== | ||
+ | To use our OpenLDAP service you have to install the so called PAM (pluggable authentication modules) modules and NSS (name service switch). NSS enables your operating system to use name resolution from different data sources. This is true for computer names, group names and user names. PAM and NSS are available for Linux and FreeBSD systems. In the following we describe the connection to our LDAP server. Because SuSE Linux and Ubuntu are widespread in Göttingen, we mainly refer to these Linux distributions. Mac OS X also works with OpenLDAP. Please contact < | ||
+ | |||
+ | ==== Requiered Software Packages ==== | ||
+ | On SuSE Linux systems you can use the //rpm// command to check if the three necessary software packages are installed: | ||
+ | < | ||
+ | > rpm -qa | grep ldap | ||
+ | nss_ldap-262-11.32.39.1 | ||
+ | openldap2-client-2.4.26-0.30.1 | ||
+ | pam_ldap-184-147.20 | ||
+ | </ | ||
+ | \\ | ||
+ | On Ubuntu systems, the following software packages are necessary: | ||
+ | < | ||
+ | libnss-ldap | ||
+ | libpam-ldap | ||
+ | ldap-utils | ||
+ | nslcd | ||
+ | </ | ||
+ | \\ | ||
+ | On FreeBSD systems, you can use the //pkg info// command: | ||
+ | < | ||
+ | > pkg info | grep ldap | ||
+ | nss_ldap-1.265_10 | ||
+ | openldap-client-2.4.40_1 | ||
+ | pam_ldap-1.8.6_2 | ||
+ | </ | ||
+ | \\ | ||
+ | In the examples above a ">" | ||
+ | The mentioned version numbers are not so important. | ||
+ | |||
+ | ==== OpenLDAP Configuration ==== | ||
+ | On OpenLDAP Linux clients, all the necessary configuration files are stored in the directory // / | ||
+ | < | ||
+ | BASE xxxxxxx | ||
+ | URI | ||
+ | binddn | ||
+ | bindpw | ||
+ | TLS_CACERT | ||
+ | ssl | ||
+ | </ | ||
+ | \\ | ||
+ | Please contact < | ||
+ | |||
+ | To use //ssl//, you have to install a CA certificate from a trustcenter. You can find this file on our server // | ||
+ | |||
+ | Make sure that // | ||
+ | |||
+ | ==== PAM Configuration ==== | ||
+ | |||
+ | PAM configuration is an important thing during the setup process of an OpenLDAP client. You have to configurate each service | ||
+ | \\ | ||
+ | \\ | ||
+ | On FreeBSD systems one of these configuration files are //system// (to make login and su work) and //sshd// (for ssh logins). Here is an example of the // / | ||
+ | < | ||
+ | # | ||
+ | # PAM configuration for the " | ||
+ | # | ||
+ | # auth | ||
+ | auth required | ||
+ | auth sufficient | ||
+ | auth requisite | ||
+ | auth sufficient | ||
+ | auth required | ||
+ | # account | ||
+ | account | ||
+ | account | ||
+ | account | ||
+ | # session | ||
+ | # | ||
+ | session | ||
+ | # password | ||
+ | password | ||
+ | </ | ||
+ | \\ | ||
+ | E.g. for OpenLDAP console logins on Ubuntu systems, you have to enter the service specific entries in // / | ||
+ | < | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | password [success=2 default=ignore] pam_unix.so obscure sha512 | ||
+ | password [success=1 user_unknown=ignore default=die] pam_ldap.so use_authtok try_first_pass | ||
+ | password requisite pam_deny.so | ||
+ | password required pam_permit.so | ||
+ | password optional pam_gnome_keyring.so | ||
+ | </ | ||
+ | \\ | ||
+ | and here an example of an common-auth configuration: | ||
+ | \\ | ||
+ | < | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | auth [success=2 default=ignore] pam_unix.so nullok_secure | ||
+ | auth [success=1 default=ignore] pam_ldap.so use_first_pass | ||
+ | auth requisite pam_deny.so | ||
+ | auth required pam_permit.so | ||
+ | </ | ||
+ | \\ | ||
+ | On FreeBSD and Linux systems, the // | ||
+ | |||
+ | On Linux systems enter: | ||
+ | < | ||
+ | > ln -fsv / | ||
+ | </ | ||
+ | \\ | ||
+ | And on a FreeBSD machine: | ||
+ | < | ||
+ | > ln -fsv / | ||
+ | </ | ||
+ | \\ | ||
+ | ==== NSS Configuration ==== | ||
+ | |||
+ | You have to change two lines in the file // / | ||
+ | < | ||
+ | group: files ldap | ||
+ | passwd: files ldap | ||
+ | </ | ||
+ | \\ | ||
+ | On FreeBSD machines, you have to link the file // / | ||
+ | \\ | ||
+ | You can check if your NSS configuration is working with the //id// command and your GWDG account (e.g. gast00). | ||
+ | < | ||
+ | > id gast00 | ||
+ | uid=6722(gast00) gid=5070(GGST) groups=5070(GGST) | ||
+ | </ | ||
+ | \\ | ||
+ | If it does not work, you get an error message like that: | ||
+ | < | ||
+ | id: gast00: no such user | ||
+ | </ | ||
+ | \\ | ||
+ | ==== Other Measures ==== | ||
+ | |||
+ | In the GWDG LDAP directory // / | ||
+ | < | ||
+ | > mkdir /usr/users | ||
+ | > ln -s /home/otto / | ||
+ | </ | ||
+ | \\ | ||
+ | Afterwards the user //otto// can use // / | ||
+ | \\ | ||
+ | ==== Contact ==== | ||
+ | If you have any problems or questions regarding OpenLDAP, please contact < |