<div dir="ltr">Hi guys,<div><br></div><div>Thank you so much your previous answers.</div><div>I realised my SID were stored in ipaNTsecurityidentifier, thanks to ipa-adtrust-install --add-sids<br><div><br></div><div>I found an other way to configure smb here:</div><div><a href="http://freeipa-users.redhat.narkive.com/ez2uKpFS/authenticate-samba-3-or-4-with-freeipa">http://freeipa-users.redhat.narkive.com/ez2uKpFS/authenticate-samba-3-or-4-with-freeipa</a><br></div><div>It works perfectly.</div><div><br></div><div>I'm using module ipasam.so I have manually scp to the samba server,</div><div>Samba is set to use kerberos + ldapsam via this ipasam module.</div></div><div>Following the instructions, I created a user role allowing service principal to read ipaNTHash value from the LDAP.</div><div>ipaNTHash are generated each time a user changes his password. Authentication works perfectly on Windows 7, 8 and 10.</div><div><br></div><div>For more details, the previously linked thread is quite clear.</div><div><br></div><div>Cheers</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><font face="arial, helvetica, sans-serif"><div><span style="font-family:arial"><font face="arial, helvetica, sans-serif"><div>--</div><div><font color="#666666">Youenn Piolet</font></div><div><font size="1" color="#999999"><a href="mailto:piolet.y@gmail.com" target="_blank">piolet.y@gmail.com</a></font></div><div style="font-size:large"><span style="font-size:small"><span style="font-family:arial"><div><font face="tahoma, sans-serif"><span style="font-family:arial,verdana,tahoma,sans-serif;font-size:11px"><span style="font-family:tahoma,sans-serif;font-size:small"><font color="#666666"><span style="color:rgb(142,142,142);font-family:arial,verdana,tahoma,sans-serif;font-size:11px"><em><br></em></span></font></span></span></font></div><font color="#8E8E8E" face="arial, verdana, tahoma, sans-serif"></font></span><font color="#8E8E8E" face="arial, verdana, tahoma, sans-serif"></font><font color="#8E8E8E" face="arial, verdana, tahoma, sans-serif"></font></span></div></font></span></div></font></div></div>
<br><div class="gmail_quote">2015-08-05 11:10 GMT+02:00 Matt . <span dir="ltr"><<a href="mailto:yamakasi.014@gmail.com" target="_blank">yamakasi.014@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chris.<br>
<br>
Yes, Apache Studio did that but I was not sure why it complained it<br>
was "already" there.<br>
<br>
I'm still getting:<br>
<br>
IPA Error 4205: ObjectclassViolation<br>
<br>
missing attribute "sambaGroupType" required by object class "sambaGroupMapping"<br>
<br>
When adding a user.<br>
<br>
I also see "class" as fielname under my "Last name", this is not OK also.<br>
<br>
<br>
<br>
We sure need to make some howto, I think we can nail this down :)<br>
<br>
Thanks for the heads up!<br>
<br>
Matthijs<br>
<div class="HOEnZb"><div class="h5"><br>
2015-08-05 7:51 GMT+02:00 Christopher Lamb <<a href="mailto:christopher.lamb@ch.ibm.com">christopher.lamb@ch.ibm.com</a>>:<br>
> Hi Matt<br>
><br>
> If I use Apache Directory Studio to add an attribute ipaCustomFields to<br>
> cn=ipaConfig,cn=etc, the operation it performs is a modify, as shown below:<br>
><br>
> #!RESULT OK<br>
> #!CONNECTION ldap://xxx-ldap2.my.silly.example.com:yyy<br>
> #!DATE 2015-08-05T05:45:04.608<br>
> dn: cn=ipaConfig,cn=etc,dc=my,dc=silly,dc=example,dc=com<br>
> changetype: modify<br>
> add: ipaCustomFields<br>
> ipaCustomFields: Samba Group Type,sambagrouptype,true<br>
><br>
> After that I then have a visible attribute ipaCustomFields as expected.<br>
><br>
> When adding the attribute, the wizard offered me "ipaCustomFields" as<br>
> attribute type in a drop down list.<br>
><br>
> Once we get this cracked, we really must write a how-to on the FreeIPA<br>
> Wiki.<br>
><br>
> Chris<br>
><br>
><br>
><br>
> From: Christopher Lamb/Switzerland/IBM@IBMCH<br>
> To: "Matt ." <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>><br>
> Cc: "<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>" <<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>><br>
> Date: <a href="tel:05.08.2015%2007" value="+33508201507">05.08.2015 07</a>:31<br>
> Subject: Re: [Freeipa-users] Ubuntu Samba Server Auth against IPA<br>
> Sent by: <a href="mailto:freeipa-users-bounces@redhat.com">freeipa-users-bounces@redhat.com</a><br>
><br>
><br>
><br>
> Hi Matt<br>
><br>
> I also got the same result at that step, but can see nothing in Apache<br>
> Directory Studio.<br>
><br>
> As I am using existing Samba / FreeIPA groups migrated across, they<br>
> probably were migrated with all the required attributes.<br>
><br>
> Looking more closely at that LDIF: I wonder should it not be:<br>
><br>
> ldapmodify -Y GSSAPI <<EOF<br>
> dn: cn=ipaconfig,cn=etc,dc=domain,dc=tld<br>
> changetype: modify<br>
> add: ipaCustomFields<br>
> ipaCustomFields: "Samba Group Type,sambagrouptype,true"<br>
> EOF<br>
><br>
> i.e. changetype: modify, instead of changetype add ?<br>
><br>
> I don't want to play around with my prod directory - I will setup an EL 7.1<br>
> VM and install FreeIPA 4.x and Samba 4.x That will allow me to play around<br>
> more destructively.<br>
><br>
> Chris<br>
><br>
><br>
><br>
><br>
><br>
> From: "Matt ." <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>><br>
> To: Christopher Lamb/Switzerland/IBM@IBMCH<br>
> Cc: Youenn PIOLET <<a href="mailto:piolet.y@gmail.com">piolet.y@gmail.com</a>>, "<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>"<br>
> <<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>><br>
> Date: <a href="tel:05.08.2015%2001" value="+33508201501">05.08.2015 01</a>:01<br>
> Subject: Re: [Freeipa-users] Ubuntu Samba Server Auth against IPA<br>
><br>
><br>
><br>
> Hi Chris,<br>
><br>
> I'm at the right path, but my issue is that:<br>
><br>
> ldapmodify -Y GSSAPI <<EOF<br>
> dn: cn=ipaconfig,cn=etc,dc=domain,dc=tld<br>
> changetype: add<br>
> add: ipaCustomFields<br>
> ipaCustomFields: "Samba Group Type,sambagrouptype,true"<br>
> EOF<br>
><br>
> Does say it exists, my ldap explorer doesn't show it, and when I add<br>
> it manually as an attribute it still fails when I add a user on this<br>
> sambagrouptype as it's needed by the other attributes<br>
><br>
> So that is my issue I think so far.<br>
><br>
> Any clue about that ?<br>
><br>
> No problem "you don't know something or are no guru" we are all<br>
> learning! :)<br>
><br>
> Cheers,<br>
><br>
> Matt<br>
><br>
><br>
> 2015-08-04 21:22 GMT+02:00 Christopher Lamb <<a href="mailto:christopher.lamb@ch.ibm.com">christopher.lamb@ch.ibm.com</a>>:<br>
>> Hi Matt, Youeen<br>
>><br>
>> Just to set the background properly, I did not invent this process. I<br>
> know<br>
>> only a little about FreeIPA, and almost nothing about Samba, but I guess<br>
> I<br>
>> was lucky enough to get the integration working on a Sunday afternoon. (I<br>
>> did have an older FreeIPA 3.x / Samba 3.x installation as a reference).<br>
>><br>
>> It sounds like we need to step back, and look at the test user and group<br>
> in<br>
>> the FreeIPA LDAP tree. I find using an LDAP browser makes this much<br>
> easier.<br>
>><br>
>> My FreeIPA / Samba Users have the following Samba extensions in FreeIPA<br>
>> (cn=accounts, cn=users):<br>
>><br>
>> * objectClass: sambasamaccount<br>
>><br>
>> * Attributes: sambaSID, sambaNTPassword, sambaPwdLastSet<br>
>><br>
>> My FreeIPA / Samba Groups have the following Samba extensions in FreeIPA<br>
>> (cn=accounts, cn=groups):<br>
>><br>
>> * objectClass: sambaGroupMapping<br>
>><br>
>> * Attributes: sambaGroupType, sambaSID<br>
>><br>
>> The Users must belong to one or more of the samba groups that you have<br>
>> setup.<br>
>><br>
>> If you don't have something similar to the above (which sounds like it is<br>
>> the case), then something went wrong applying the extensions. It would be<br>
>> worth testing comparing a new user / group created post adding the<br>
>> extensions to a previous existing user.<br>
>><br>
>> i.e.<br>
>> are the extensions missing on existing users / groups?<br>
>> are the extensions missing on new users / groups?<br>
>><br>
>> Cheers<br>
>><br>
>> Chris<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> From: Youenn PIOLET <<a href="mailto:piolet.y@gmail.com">piolet.y@gmail.com</a>><br>
>> To: "Matt ." <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>><br>
>> Cc: Christopher Lamb/Switzerland/IBM@IBMCH,<br>
>> "<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>" <<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>><br>
>> Date: <a href="tel:04.08.2015%2018" value="+33408201518">04.08.2015 18</a>:56<br>
>> Subject: Re: [Freeipa-users] Ubuntu Samba Server Auth against IPA<br>
>><br>
>><br>
>><br>
>> Hi there,<br>
>><br>
>> I have difficulties to follow you at this point :)<br>
>> Here is what I've done and what I've understood:<br>
>><br>
>> ## SMB Side<br>
>> - Testparm OK<br>
>> - I've got the same NT_STATUS_NO_SUCH_USER when I try to connect.<br>
>> - pdbedit -Lv output is all successfull but I can see there is a filter :<br>
>> (&(uid=*)(objectclass=sambaSamAccount). In LDAP, the users don't have<br>
>> sambaSamAccount.<br>
>><br>
>> ## LDAP / FreeIPA side<br>
>> - Since SMB server uses LDAP, I did ipa-adtrust-install on my FreeIPA<br>
>> server to get samba LDAP extensions.<br>
>> - I can see samba classes exist in LDAP but are not used on my group<br>
>> objects nor my user objects<br>
>> - I have add sambaSamAccount in FreeIPA default user classes,<br>
>> and sambaGroupMapping to default group classes. In that state I can't<br>
>> create user nor groups anymore, as new samba attributes are needed for<br>
>> instantiation.<br>
>> - I have add in etc ipaCustomFields: 'Samba Group<br>
> Type,sambagrouptype,true'<br>
>> but I don't get what it does.<br>
>> - I tried to add the samba.js plugin. It works, and adds the "local"<br>
> option<br>
>> when creating a group in FreeIPA, supposed to set sambagrouptype to 4 or<br>
> 2<br>
>> (domain). It doesn't work and tells that sambagrouptype attribute doesn't<br>
>> exist (but it should now I put sambaGroupType class by default...)<br>
>><br>
>> ## Questions<br>
>> 0) Can I ask samba not to search sambaSamAccount and use unix / posix<br>
>> instead? I guess no.<br>
>> 1) How to generate the user/group SIDs ? They are requested to add<br>
>> sambaSamAccount classes.<br>
>> This article doesn't seem relevant since we don't use domain controller<br>
>><br>
> <a href="http://docs.fedoraproject.org/en-US/Fedora/17/html/FreeIPA_Guide/cifs.html" rel="noreferrer" target="_blank">http://docs.fedoraproject.org/en-US/Fedora/17/html/FreeIPA_Guide/cifs.html</a><br>
>> and netgetlocalsid returns an error.<br>
>> 2) How to fix samba.js plugin?<br>
>> 3) I guess an equivalent of samba.js is needed for user creation, where<br>
> can<br>
>> I find it?<br>
>> 4) Is your setup working with Windows 8 / Windows 10 and not only Windows<br>
>> 7?<br>
>><br>
>> Thanks a lot for your previous and future answers<br>
>><br>
>> --<br>
>> Youenn Piolet<br>
>> <a href="mailto:piolet.y@gmail.com">piolet.y@gmail.com</a><br>
>><br>
>><br>
>> 2015-08-04 17:55 GMT+02:00 Matt . <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>>:<br>
>> Hi,<br>
>><br>
>> Yes, log is anonymised.<br>
>><br>
>> It's strange, my user doesn't have a SambaPwdLastSet, also when I<br>
>> change it's password it doesn't get it in ldap.<br>
>><br>
>> There must be something going wrong I guess.<br>
>><br>
>> Matt<br>
>><br>
>> 2015-08-04 17:45 GMT+02:00 Christopher Lamb<br>
> <<a href="mailto:christopher.lamb@ch.ibm.com">christopher.lamb@ch.ibm.com</a><br>
>> >:<br>
>> > Hi Matt<br>
>> ><br>
>> > I assume [username] is a real username, identical to that in the<br>
>> FreeIPA<br>
>> > cn=accounts, cn=users tree? (i.e. you anonymised the log extract).<br>
>> ><br>
>> > You user should be a member of the appropriate samba groups that you<br>
>> setup<br>
>> > in FreeIPA.<br>
>> ><br>
>> > You should check that the user attribute SambaPwdLastSet is set to a<br>
>> > positive value (e.g. 1). If not you get an error in the Samba logs -<br>
> I<br>
>> > would need to play around again with a test user to find out the<br>
> exact<br>
>> > error.<br>
>> ><br>
>> > I don't understand what you mean about syncing the users local, but<br>
> we<br>
>> did<br>
>> > not need to do anything like that.<br>
>> ><br>
>> > Chris<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > From: "Matt ." <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>><br>
>> > To: Christopher Lamb/Switzerland/IBM@IBMCH<br>
>> > Cc: "<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>" <<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>><br>
>> > Date: <a href="tel:04.08.2015%2015" value="+33408201515">04.08.2015 15</a>:33<br>
>> > Subject: Re: [Freeipa-users] Ubuntu Samba Server Auth against<br>
>> IPA<br>
>> ><br>
>> ><br>
>> ><br>
>> > Hi Chris,<br>
>> ><br>
>> > A puppet run added another passdb backend, that was causing my issue.<br>
>> ><br>
>> > What I still experience is:<br>
>> ><br>
>> ><br>
>> > [2015/08/04 15:29:45.477783, 3]<br>
>> > ../source3/auth/check_samsec.c:399(check_sam_security)<br>
>> > check_sam_security: Couldn't find user 'username' in passdb.<br>
>> > [2015/08/04 15:29:45.478026, 2]<br>
>> > ../source3/auth/auth.c:288(auth_check_ntlm_password)<br>
>> > check_ntlm_password: Authentication for user [username] -><br>
>> > [username] FAILED with error NT_STATUS_NO_SUCH_USER<br>
>> ><br>
>> ><br>
>> > I also wonder if I shall still sync the users local, or is it<br>
> needed ?<br>
>> ><br>
>> > Thanks again,<br>
>> ><br>
>> > Matt<br>
>> ><br>
>> > 2015-08-04 14:16 GMT+02:00 Christopher Lamb <<br>
>> <a href="mailto:christopher.lamb@ch.ibm.com">christopher.lamb@ch.ibm.com</a>>:<br>
>> >> Hi Matt<br>
>> >><br>
>> >> From our smb.conf file:<br>
>> >><br>
>> >> [global]<br>
>> >> security = user<br>
>> >> passdb backend = ldapsam:ldap://<a href="http://xxx-ldap2.my.silly.example.com" rel="noreferrer" target="_blank">xxx-ldap2.my.silly.example.com</a><br>
>> >> ldap suffix = dc=my,dc=silly,dc=example,dc=com<br>
>> >> ldap admin dn = cn=Directory Manager<br>
>> >><br>
>> >> So yes, we use Directory Manager, it works for us. I have not tried<br>
>> with<br>
>> > a<br>
>> >> less powerful user, but it is conceivable that a lesser user may not<br>
>> see<br>
>> >> all the required attributes, resulting in "no such user" errors.<br>
>> >><br>
>> >> Chris<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> From: "Matt ." <<a href="mailto:yamakasi.014@gmail.com">yamakasi.014@gmail.com</a>><br>
>> >> To: Christopher Lamb/Switzerland/IBM@IBMCH<br>
>> >> Cc: "<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>" <<a href="mailto:freeipa-users@redhat.com">freeipa-users@redhat.com</a>><br>
>> >> Date: <a href="tel:04.08.2015%2013" value="+33408201513">04.08.2015 13</a>:32<br>
>> >> Subject: Re: [Freeipa-users] Ubuntu Samba Server Auth against<br>
>> IPA<br>
>> >><br>
>> >><br>
>> >><br>
>> >> Hi Chris,<br>
>> >><br>
>> >> Thanks for the heads up, indeed local is 4 I see now when I add a<br>
>> >> group from the GUI, great thanks!<br>
>> >><br>
>> >> But do you use Directory Manager as ldap admin user or some other<br>
>> >> admin account ?<br>
>> >><br>
>> >> I'm not sure id DM is needed and it should get that deep into IPA.<br>
>> >> Also when starting samba it cannot find "such user" as that sounds<br>
>> >> quite known as it has no UID.<br>
>> >><br>
>> >> From your config I see you use DM, this should work ?<br>
>> >><br>
>> >> Thanks!<br>
>> >><br>
>> >><br>
>> >> Matt<br>
>> >><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>><br>
>> --<br>
>> Manage your subscription for the Freeipa-users mailing list:<br>
>> <a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
>> Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br>
>><br>
>><br>
>><br>
><br>
><br>
><br>
><br>
> --<br>
> Manage your subscription for the Freeipa-users mailing list:<br>
> <a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
> Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br>
><br>
><br>
><br>
><br>
<br>
--<br>
Manage your subscription for the Freeipa-users mailing list:<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br>
</div></div></blockquote></div><br></div>