<div dir="ltr">Hello,<div><br></div><div>I've tried this as well. My IPA is not connected to an AD. My smb.conf looks almost the same. The differences are:</div><div>- I got the default workgroup set (MY or something)</div><div>- No FILE:/ prefix for keytab file</div><div><br></div><div>I had the samba and ipserver on the same box so I just had to add the cifs server and get keytab file in the same way.</div><div>I was a bit surprised to see that accessing samba using "smbclient -k \\..." worked right away from a linux box. Then stopped working if I did kdestroy.</div><div><br></div><div><b>But,</b> I never got it to work from Windows. The Windows PC is not joined to any AD, it uses MIT Kerb client 4.0.1 and I successfully get tickes and can sshlogin via putty without password.</div><div><br></div><div>Any ideas on how to get this going from Windows as well?</div><div><br></div><div>-- john</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-29 20:54 GMT+01:00 Loris Santamaria <span dir="ltr"><<a href="mailto:loris@lgs.com.ve" target="_blank">loris@lgs.com.ve</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El jue, 23-10-2014 a las 12:32 +0200, Sumit Bose escribió:<br>
<div><div class="h5">> On Tue, Oct 21, 2014 at 07:49:11AM -0430, Loris Santamaria wrote:<br>
> > El lun, 20-10-2014 a las 21:19 -0400, Dmitri Pal escribió:<br>
> > > On 10/20/2014 09:15 AM, Loris Santamaria wrote:<br>
> ><br>
> > [...]<br>
> ><br>
> > > ><br>
> > > > Trying to join the server to the domain (net rpc join -U domainadmin -S<br>
> > > > ipaserver) fails, and it causes a samba crash on the ipa server.<br>
> > > > Investigating the cause of the crash I found that pdbedit crashes as<br>
> > > > well (backtrace attached). I couldn't get a meaningful backtrace from<br>
> > > > the samba crash however I attached it as well.<br>
> > > ><br>
> > > > Seems to me that the samba ipasam backend on ipa doesn't like something<br>
> > > > in the host or the "domain computers" group object in ldap, but I cannot<br>
> > > > see what could be the problem. Perhaps someone more familiar with the<br>
> > > > ipasam code can spot it quickly.<br>
> ><br>
> > > Do I get it right that you really looking for<br>
> > > <a href="https://fedorahosted.org/sssd/ticket/1588" target="_blank">https://fedorahosted.org/sssd/ticket/1588</a> that was just released<br>
> > > upstream?<br>
> > > It would be cool if you can try using SSSD 1.12.1 under Samba FS in<br>
> > > the use case you have and provide feedback on how it works for you.<br>
> > ><br>
> > > AFAIU you install Samba FS and then use ipa-client to configure SSSD<br>
> > > under it and it should work.<br>
> > > If not we probably should document it (but I do not see any special<br>
> > > design page which leads me to the above expectation).<br>
> ><br>
> > Ok, I'll happily try sssd 1.12.1.<br>
> ><br>
> > Just a question, in smb.conf one should use "security = domain" or<br>
> > "security = ads"?<br>
><br>
> 'ads' because we want to use Kerberos. But there some other<br>
> configuration options which needs attention, e.g. you have to create a<br>
> keytab for the cifs service and make it available to samba. I'll try to<br>
> set up an small howto page listing the needed steps and come back to you<br>
> early next week.<br>
<br>
</div></div>It Works :D, and here is what I did:<br>
<br>
Test environment: One realm domain with two Centos 7 / ipa 3.3 masters,<br>
one trusted AD forest (windows 2008R2 controllers), one Centos 7 file<br>
server.<br>
<br>
Step 1) On the file server enable mkosek's COPR ipa repo:<br>
<a href="https://copr.fedoraproject.org/coprs/mkosek/freeipa/" target="_blank">https://copr.fedoraproject.org/coprs/mkosek/freeipa/</a><br>
<br>
2) Install required packages packages:<br>
yum -y install ipa-client sssd-libwbclient samba samba client<br>
<br>
3) join file server to the ipa realm:<br>
ipa-client-install --mkhomedir<br>
<br>
Please note that this step fails, shortly after creating the keytab and<br>
configuring sssd, probably caused by the version mismatch between ipa<br>
server (3.3) and client (4.1). I will report the failure shortly.<br>
Because of the failure I had to complete part of the join procedure<br>
manually:<br>
authconfig --enablesssdauth --enablemkhomedir --update (on the client)<br>
ipa dnsrecord-add my.realm sambatest --a-rec=x.y.w.z (on ipa server)<br>
<br>
4) On the ipa server create the cifs principal for samba:<br>
ipa service-add cifs/sambatest.my.realm<br>
<br>
5) Install keytab on the samba host:<br>
ipa-getkeytab -s ipaserver.my.realm -p cifs/sambatest.my.realm<br>
-k /etc/samba/samba.keytab<br>
<br>
6) Edit /etc/samba/smb.conf on the samba file server:<br>
[global]<br>
        workgroup = MY<br>
        realm = MY.REALM<br>
<span class="">        dedicated keytab file = FILE:/etc/samba/samba.keytab<br>
        kerberos method = dedicated keytab<br>
        log file = /var/log/samba/log.%m<br>
</span>        security = ads<br>
<br>
[homes]<br>
        browsable = no<br>
        writable = yes<br>
<br>
[shared]<br>
        path = /home/shared<br>
        writable = yes<br>
        browsable=yes<br>
        write list = @admins<br>
<br>
7) To enable samba /home sharing one should turn on a selinux boolean:<br>
setsebool -P samba_enable_home_dirs on<br>
<br>
8) restart samba<br>
<br>
Testing:<br>
<br>
On another linux member of the IPA domain it is possible to connect to<br>
the samba shares using smbclient -k :<br>
kinit user@MY.REALM<br>
smbclient -k -L sambatest.my.realm<br>
smbclient -k //sambatest.my.realm/shared<br>
<br>
On a windows machine, member of the AD domain it is possible to connect<br>
to the samba shares typing in the windows explorer location bar:<br>
\\sambatest.my.realm<br>
Also, if the ad user is an (indirect) member of the IPA admins group,<br>
thanks to the trust relationship, with the above smb.conf he may have<br>
write access to the \shared folder.<br>
<br>
Thanks to the ipa and sssd teams for this great enablement!<br>
<div class="HOEnZb"><div class="h5">--<br>
Loris Santamaria   linux user #70506   <a href="mailto:xmpp%3Aloris@lgs.com.ve">xmpp:loris@lgs.com.ve</a><br>
Links Global Services, C.A.            <a href="http://www.lgs.com.ve" target="_blank">http://www.lgs.com.ve</a><br>
Tel: 0286 952.06.87  Cel: 0414 095.00.10  <a href="mailto:sip%3A103@lgs.com.ve">sip:103@lgs.com.ve</a><br>
------------------------------------------------------------<br>
"If I'd asked my customers what they wanted, they'd have said<br>
a faster horse" - Henry Ford<br>
</div></div><br>--<br>
Manage your subscription for the Freeipa-users mailing list:<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
Go To <a href="http://freeipa.org" target="_blank">http://freeipa.org</a> for more info on the project<br></blockquote></div><br></div>