<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Great ! Thank you very much. It works !</div><div><br></div><div>Regards,</div><div>Jan </div><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Alexander Bokovoy" <abokovoy@redhat.com><br><b>To: </b>"Jan Karásek" <jan.karasek@elostech.cz><br><b>Cc: </b>freeipa-users@redhat.com<br><b>Sent: </b>Thursday, August 18, 2016 4:03:14 PM<br><b>Subject: </b>Re: [Freeipa-users] IPA-AD ldap acces - account ?<br></div><br><div data-marker="__QUOTED_TEXT__">On Thu, 18 Aug 2016, Jan Karásek wrote:<br>>Hi,<br>>thank you. We are experiencing problems with LDAP access from IPA<br>>servers in IPA-AD scenario with one-way trust (Win 2012).<br>><br>>So for ldap access IPA uses the xyz$@domain special trust account.<br>>According my lab - this account is on the AD side considered as a<br>>member of Authenticated users group. By default Authenticated users are<br>>member of group Pre-Windows 2000 Compatible Access, and this group have<br>>read permission on object type User and therefore IPA is able to read<br>>POSIX attributes from these objects. (tested in my lab environment)<br>><br>>In our case - due to security team - there is no possibility for<br>>Authenticated users to read user's objects - and then IPA is unable to<br>>read objects from AD ldap. So we have situation, where kerberos works<br>>OK but we are not able to get POSIX attributes from ldap.<br>Create a group that could be granted such access, add TDO object there.<br><br>>This situation could have been solved by adding read permission<br>>directly to the IPA access account(TDO), but unfortunately it looks<br>>like it is not possible.<br>Why is it not possible? The account is in AD, one can always grant<br>it more permissions there.<br><br>><br>>Questions :<br>><br>>1. Do the IPA depends on ability of Authenticated users group to access<br>>user's objects attributes ?<br>At the very least, yes. Otherwise you need to grant more permissions to<br>the TDO account in AD, even though you cannot directly get access to the<br>account from non-advanced UI view. However, even Samba 'net' utility<br>works fine:<br><br>1. Create a group in the forest root domain:<br># net rpc group add trust-rpc-readonly -S w12.ad.test -UAdministrator%PASSWORD<br><br>2. Add our TDO object to the group:<br># net rpc group addmem trust-rpc-readonly 'IPAAD$' -S w12.ad.test -UAdministrator%PASSWORD<br><br>3. Check that TDO oubject is part of the group<br># net rpc group members trust-read-only -S w12.ad.test -UAdministrator%PASSWORD<br>AD\IPAAD$<br><br>Now you can go to UI and assign specific privileges to the group.<br><br>>2. Is it possible to setup some other "standard" service account for<br>>IPA access to AD ldap ?<br>No.<br><br>><br>>Thank you,<br>>Jan<br>><br>><br>><br>>From: "Alexander Bokovoy" <abokovoy@redhat.com><br>>To: "Jan Karásek" <jan.karasek@elostech.cz><br>>Cc: freeipa-users@redhat.com<br>>Sent: Wednesday, August 17, 2016 4:12:28 PM<br>>Subject: Re: [Freeipa-users] IPA-AD ldap acces - account ?<br>><br>>On Wed, 17 Aug 2016, Jan Karásek wrote:<br>>>Hi,<br>>><br>>>please could somebody explain how and and with which account IPA is<br>>>accessing DC in IPA - AD trust scenario. Is is possible to simulate<br>>>with ldapsearch some query to AD with the same permission as IPA<br>>>server?<br>>Depends on what trust we have. For two-way trust SSSD on IPA masters<br>>uses host/master.ipa.domain@IPA.DOMAIN principal because we map it to a<br>>SID with a special well-known RID 'Domain Computers' (-515) and attach<br>>an MS-PAC record to the TGT issued for this service principal.<br>><br>>For one-way trust SSSD on IPA masters uses so-called TDO account. These<br>>are special accounts in AD domains which look like a machine account<br>>(FOO$) but instead use NetBIOS name of the trusted forest and have<br>>specific attributes associated with it.<br>><br>>>We have some issues with reading ldap object from AD and I would like<br>>>to simulate that from command line.<br>><br>>Simplest way is to do something like this on IPA master for one-way<br>>trust:<br>><br>># klist -kt /var/lib/sss/keytabs/<trust>.keytab<br>><br>>notice the principal name there, let's say it is NAME$@TRUST<br>><br>># kinit -kt /var/lib/sss/keytabs/<trust>.keytab 'NAME$@TRUST'<br>># ldapsearch -H ad.dc -Y GSSAPI ....<br>><br>>For two-way trust it is enough to kinit as IPA master host principal:<br>><br>># kinit -k<br>># ldapsearch -H ad.dc -Y GSSAPI ...<br>><br>><br>>-- <br>>/ Alexander Bokovoy<br><br>>-- <br>>Manage your subscription for the Freeipa-users mailing list:<br>>https://www.redhat.com/mailman/listinfo/freeipa-users<br>>Go to http://freeipa.org for more info on the project<br><br><br>-- <br>/ Alexander Bokovoy<br></div></div></body></html>