This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docpublic:systemes:ldap:ldap2-4 [2014/06/09 16:17] procacci@tem-tsp.eu [references] |
docpublic:systemes:ldap:ldap2-4 [2015/05/07 20:45] (current) procacci@tem-tsp.eu [lastbind rpm] |
||
|---|---|---|---|
| Line 16: | Line 16: | ||
| sys 0m15.655s | sys 0m15.655s | ||
| </ | </ | ||
| + | |||
| + | ==== admin password ==== | ||
| + | |||
| + | generation pour la configuration slapd.conf : | ||
| + | |||
| + | < | ||
| + | cli : slappasswd -h < | ||
| + | < | ||
| + | The output can be copy-pasted into the LDAP configuration file for the rootpw field. | ||
| + | </ | ||
| + | |||
| + | exemple | ||
| + | |||
| + | < | ||
| + | # slappasswd -h {SSHA} | ||
| + | {SSHA}2c4m7rvutm1HrNFvthmeidRkWWLdERxQ | ||
| + | </ | ||
| + | |||
| Line 151: | Line 169: | ||
| # At least one of SLAPD_LDAP, SLAPD_LDAPI and SLAPD_LDAPS must be set to ' | # At least one of SLAPD_LDAP, SLAPD_LDAPI and SLAPD_LDAPS must be set to ' | ||
| SLAPD_LDAPS=yes | SLAPD_LDAPS=yes | ||
| + | </ | ||
| + | |||
| + | en centos/rehl 7 | ||
| + | |||
| + | < | ||
| + | # grep ldaps / | ||
| + | # - example: ldapi:/// ldap:// | ||
| + | SLAPD_URLS=" | ||
| </ | </ | ||
| Line 202: | Line 228: | ||
| modify complete | modify complete | ||
| </ | </ | ||
| + | |||
| + | ===== centos rhel 7 ===== | ||
| + | |||
| + | ==== install ==== | ||
| + | |||
| + | < | ||
| + | # yum install openldap-servers | ||
| + | Installé : | ||
| + | openldap-servers.x86_64 0: | ||
| + | Dépendances installées : | ||
| + | libtool-ltdl.x86_64 0: | ||
| + | </ | ||
| + | |||
| + | activation avec systemctl | ||
| + | |||
| + | < | ||
| + | # systemctl enable slapd.service | ||
| + | ln -s '/ | ||
| + | |||
| + | # systemctl start slapd.service | ||
| + | |||
| + | # systemctl status slapd.service | ||
| + | |||
| + | slapd.service - OpenLDAP Server Daemon | ||
| + | | ||
| + | | ||
| + | Process: 1319 ExecStart=/ | ||
| + | Process: 1295 ExecStartPre=/ | ||
| + | Main PID: 1320 (slapd) | ||
| + | | ||
| + | | ||
| + | |||
| + | Jan 09 14:56:58 japi runuser[1309]: | ||
| + | Jan 09 14:56:58 japi runuser[1309]: | ||
| + | Jan 09 14:56:58 japi runuser[1311]: | ||
| + | Jan 09 14:56:58 japi runuser[1311]: | ||
| + | Jan 09 14:56:58 japi runuser[1313]: | ||
| + | Jan 09 14:56:58 japi runuser[1313]: | ||
| + | Jan 09 14:56:58 japi runuser[1315]: | ||
| + | Jan 09 14:56:58 japi runuser[1315]: | ||
| + | Jan 09 14:56:58 japi slapd[1319]: | ||
| + | mockbuild@worker1.bsys.centos.org:/ | ||
| + | Jan 09 14:56:58 japi systemd[1]: Started OpenLDAP Server Daemon. | ||
| + | </ | ||
| + | |||
| + | ===== centos 7 firewallD ===== | ||
| + | |||
| + | ==== ref ==== | ||
| + | |||
| + | * http:// | ||
| + | * http:// | ||
| + | |||
| + | ==== service ldap ==== | ||
| + | |||
| + | au depart, par defaul il y a le service ssh d' | ||
| + | |||
| + | < | ||
| + | # firewall-cmd --zone=public --list-all | ||
| + | public (default, active) | ||
| + | interfaces: eth0 | ||
| + | sources: | ||
| + | services: dhcpv6-client ssh | ||
| + | ports: | ||
| + | masquerade: no | ||
| + | forward-ports: | ||
| + | icmp-blocks: | ||
| + | rich rules: | ||
| + | </ | ||
| + | |||
| + | ==== liste services ==== | ||
| + | |||
| + | les services sont definit dans des fichiers xml dans une arborescence systeme | ||
| + | |||
| + | < | ||
| + | [root@ldap ~]# firewall-cmd --get-services | ||
| + | amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https | ||
| + | [root@ldap ~]# ls / | ||
| + | amanda-client.xml | ||
| + | bacula-client.xml | ||
| + | bacula.xml | ||
| + | dhcpv6-client.xml | ||
| + | dhcpv6.xml | ||
| + | </ | ||
| + | |||
| + | ==== rich rule ldap ==== | ||
| + | |||
| + | ajouter une regle ldap depuis une source IP | ||
| + | |||
| + | < | ||
| + | [root@ldap ~]# firewall-cmd --permanent --add-rich-rule 'rule family=" | ||
| + | success | ||
| + | [root@ldap ~]# firewall-cmd --reload | ||
| + | success | ||
| + | [root@ldap ~]# firewall-cmd --zone=public --list-all | ||
| + | public (default, active) | ||
| + | interfaces: eth0 | ||
| + | sources: | ||
| + | services: dhcpv6-client ssh | ||
| + | ports: | ||
| + | masquerade: no | ||
| + | forward-ports: | ||
| + | icmp-blocks: | ||
| + | rich rules: | ||
| + | rule family=" | ||
| + | </ | ||
| + | |||
| ===== references ===== | ===== references ===== | ||
| Line 207: | Line 339: | ||
| * http:// | * http:// | ||
| * http:// | * http:// | ||
| + | |||
| + | |||
| + | ===== lastbind rpm ===== | ||
| + | |||
| + | integration de lastbind au package source openldap | ||
| + | |||
| + | recuperation package source via yum | ||
| + | |||
| + | < | ||
| + | # yum install yum-utils | ||
| + | # yumdownloader --source openldap-servers | ||
| + | # ls -l openldap-2.4.39-6.el7.src.rpm | ||
| + | -rw-r--r-- 1 root root 5593007 31 mars 21:19 openldap-2.4.39-6.el7.src.rpm | ||
| + | </ | ||
| + | |||
| + | http:// | ||
| + | |||
| + | < | ||
| + | # yum install rpm-build | ||
| + | </ | ||
| + | |||
| + | compiler les package avec un user non privilegié | ||
| + | |||
| + | < | ||
| + | [root@japi ~]# useradd builder | ||
| + | [root@japi ~]# su - builder | ||
| + | [builder@japi ~]$ ls | ||
| + | [builder@japi ~]$ mkdir -p ~/ | ||
| + | [builder@japi ~]$ echo ' | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | [builder@japi ~]$ rpm -iv / | ||
| + | [builder@japi ~]$ ls -l rpmbuild/ | ||
| + | total 76 | ||
| + | -rw-rw-r-- 1 builder builder 76148 Mar 6 03:21 openldap.spec | ||
| + | </ | ||
| + | |||
| + | dependances necessaire pour le build | ||
| + | |||
| + | < | ||
| + | [root@japi ~]# yum install nss-devel krb5-devel tcp_wrappers-devel unixODBC-devel glibc-devel libtool libtool-ltdl-devel groff perl-devel openssl-devel libdb-devel cracklib-devel perl-ExtUtils-Embed | ||
| + | Résumé de la transaction | ||
| + | ===================================================================================================== | ||
| + | Installation | ||
| + | |||
| + | Taille totale des téléchargements : | ||
| + | Taille d' | ||
| + | </ | ||