[Wylug-help] LDAP setup on Centos 7
David Morris
david.morris at 3gtelecoms.net
Fri Nov 27 17:05:48 UTC 2015
I think you have this line in basedomain.ldif :
dc: Server
and it should be
dc: ringways
This is only a guess though, I've never used LDAP.
David Morris
3G Telecommunications Limited
Office: +44 (0)113 391 0781
Mobile: +44 (0) 7790 606023
email: david.morris at 3gtelecoms.net
skype: david-3gtelecommunications
On 27 November 2015 at 16:54, Gary Stainburn <gary.stainburn at ringways.co.uk>
wrote:
> The whole list of files is
>
> [root at ollie2 ldap]# cat reset_ldap.sh
> #!/bin/bash -x
>
> systemctl stop slapd
> rpm -e openldap-servers openldap-clients
> cd /var/lib
> rm -Rf ldap
> cd /etc/openldap/
> rm -Rf slapd.d/
> yum -y install openldap-servers openldap-clients
> cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
> systemctl start slapd
> slaptest -F /etc/openldap/slapd.d
>
>
>
>
>
> [root at ollie2 ldap]# cat setup_ldap.sh
> #!/bin/bash -x
>
> ldapadd -Y EXTERNAL -H ldapi:/// -f chrootpw.ldif
> ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
> ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
> ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
> ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif
> ldapadd -x -D cn=Manager,dc=ringways,dc=com -W -f basedomain.ldif
>
>
>
>
> [root at ollie2 ldap]# cat chrootpw.ldif
> # specify the password generated above for "olcRootPW" section
>
> dn: olcDatabase={0}config,cn=config
> changetype: modify
> add: olcRootPW
> olcRootPW: {SSHA}bbn4VrMZ0CAt6rZtVWBUX+RruM8yz+d4
>
>
>
> [root at ollie2 ldap]# cat chdomain.ldif
> # replace to your own domain name for "dc=***,dc=***" section
>
> # specify the password generated above for "olcRootPW" section
>
> dn: olcDatabase={1}monitor,cn=config
> changetype: modify
> replace: olcAccess
> olcAccess: {0}to * by
> dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
> read by dn.base="cn=Manager,dc=ringways,dc=com" read by * none
>
> dn: olcDatabase={2}hdb,cn=config
> changetype: modify
> replace: olcSuffix
> olcSuffix: dc=ringways,dc=com
>
> dn: olcDatabase={2}hdb,cn=config
> changetype: modify
> replace: olcRootDN
> olcRootDN: cn=Manager,dc=ringways,dc=com
>
> dn: olcDatabase={2}hdb,cn=config
> changetype: modify
> add: olcRootPW
> olcRootPW: {SSHA}HFbPOXoq0AZOmjLCQxsC0Ykj16G8XyHf
> dn: olcDatabase={2}hdb,cn=config
> changetype: modify
> add: olcAccess
> olcAccess: {0}to attrs=userPassword,shadowLastChange by
> dn="cn=Manager,dc=ringways,dc=com" write by anonymous auth by self write
> by
> * none
> olcAccess: {1}to dn.base="" by * read
> olcAccess: {2}to * by dn="cn=Manager,dc=ringways,dc=com" write by * read
>
>
>
>
> [root at ollie2 ldap]# cat basedomain.ldif
> # replace to your own domain name for "dc=***,dc=***" section
>
> dn: dc=ringways,dc=com
> objectClass: top
> objectClass: dcObject
> objectclass: organization
> o: Ringways
> dc: Server
>
> dn: cn=Manager,dc=ringways,dc=com
> objectClass: organizationalRole
> cn: Manager
> description: Directory Manager
>
> dn: ou=People,dc=ringways,dc=com
> objectClass: organizationalUnit
> ou: People
>
> dn: ou=Group,dc=ringways,dc=com
> objectClass: organizationalUnit
> ou: Group
>
>
> [root at ollie2 ldap]#
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wylug-help/attachments/20151127/d627f536/attachment-0001.html>
More information about the Wylug-help
mailing list