On 2020-05-20 06:04, Andreas Hasenack wrote:
> olcRootDN: cn=Manager,dc=van,dc=company,dc=com
> olcRootPW:: e1NTSEF9cEpWbEIzOEh4UXJpcjnvSUl2enZzWTF1akt4Nnd6OTk=
You should change that password now, since you just shared its SSHA
hash to the world ;)
It's my mistake. I reset a new password for this rootDN.
> olcAccess: {0}to attrs=userPassword by self write by anonymous
auth by
> dn.ba
> se="cn=Manager,dc=van,dc=company,dc=com" write by * none
> olcAccess: {1}to * by self write by
> dn="cn=Manager,dc=van,dc=company,dc=
> com" write by * read
It depends how your replica is connecting as. The above means that
only cn=Manager and the user itself can read userPassword. Also note
that since cn=Manager is also the rootdn, you don't need to add an ACL
for it.
The second ACL also means that a user can change any of his/her own
attributes (to * by self write), I'm not sure that is wise as I
haven't seen what's in those entries. But if you are using RFC2307 and
have attributes like uidNumber and gidNumber, it means the user can
change the uidNumber and gidNumber to 0, for example, and become root
on the machine that is using this directory as an NSS source for
passwd and shadow.
> entryCSN: 20200504150528.806636Z#000000#000#000000
> modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
> modifyTimestamp: 20200504150528Z
>
> Now I found on the slave(ldap-03) all userPassword attributes is
> disappeared. So I think the ACL may blocked the replication. I think I
> need add the replication user (rpuser) to the ACL on the master and
> allow the rpuser read(or RW?) access.
Ah, now I saw this bit. Yes, you need to add the replication user to
the acls to allow reading all attributes you want replicated, and also
change the limits for that user so that it is not hampered by time and
size limits.
Thank you for the advises. I made a ldif like this:
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by *
none
olcAccess: {1}to by dn="uid=rpuser,dc=van,dc=company,dc=com" read by *
read
{0} will allow user to change their own password, others can auth
against the LDAP.
(1) will allow replication user (rpuser) to read everything. others (*)
will read as well.
Does the above ldif looks right?
I see in my old ACL {1} it already has "by * read", but why the
replication user got blocked for replication? Is the rpuser not belong
to *?
Gao