<div dir="ltr"><div><div><div><div>if I can make a suggestion you may be a lot better off with pam_krb5 than winbind or LDAP.<br></div>AD's Kerberos server is compatible with the MIT Kerberos 5 client.<br></div>Ive done this with web apps many times with AD, Heimdal, and MIT Kerberos 5 servers and it works quite well with any of them. For spacewalks purposes all you really need from your AD server is for it to verify that the username and password is correct which is exactly what the Kerberos 5 protocol does no more no less. So all the other methods mentioned before in this string are really over complicated over kill. The best part is its easy to configure and maintain because it can mostly auto configure based on DNS entries AD needs to operate any way.<br>
<br></div>here is an example of a /etc/krb5.conf that should work<br>'<br>[libdefaults]<br> default_realm = <MY.AD.DOMIAN.HERE><br> dns_lookup_realm = true<br> dns_lookup_kdc = true<br> ticket_lifetime = 24h<br>
 renew_lifetime = 7d<br> forwardable = true<br>'<br></div><div>The rest of the config file isn't really needed but its not a bad idea to populate the domain_realm section.<br></div><div>Also unless you want your users to be able to reset their passwords on the box you don't have to bother with all the keytab rigamarole. <br>
</div><br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 17, 2013 at 9:17 AM, J Epperson <span dir="ltr"><<a href="mailto:spacewalk@epperson.homelinux.net" target="_blank">spacewalk@epperson.homelinux.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:Verdana,Geneva,sans-serif">
<p>AD is a somewhat proprietary implementation of LDAP.  The link provided is for a more extensive integration of LDAP/AD into spacewalk/Satellite than the GUI user PAM authentication you want to do (although it does contain a link to the doc on implementing PAM authentication).  Here are our working notes from our Satellite installation journals.</p>

<p> </p>
<table style="width:648px" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td colspan="2" width="648" valign="top">
<p>ALLOWING AD USERS TO LOGIN TO SATELLITE WITH AD CREDENTIALS USING WINBIND</p>
</td>
</tr>
<tr>
<td colspan="2" width="648" valign="top">
<p>To have satellite authenticate via pam to an external source, multiple steps must be performed.</p>
<p>NOTE: Unless the host has winbind enabled for passwd in /etc/nssswitch.conf, users must have an account that matches their windows login in the local passwd/shadow file.</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">1</p>
</td>
<td width="556" valign="top">
<p>Install winbind and authconfig-tui</p>
<p> </p>
<p>        yum –y install samba-winbind samba-winbind-clients authconfig</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">2</p>
</td>
<td width="556" valign="top">
<p>Configure winbind with authconfig-tui on the command line</p>
<ul>
<li>Select Use Winbind and Local Authorization is sufficient click next</li>
<li>Select ads for security model</li>
<li>In the Domain enter the NETBIOS domain (not the AD fqdn)</li>
<li>In Domain Controllers enter the AD domain</li>
<li>In ADS Realm enter the AD domain again</li>
<li>Unless you want to allow every windows user in your enterprise AD to SSH into your satellite server, set Template Shell to /sbin/nologin</li>
<li>Do not join the domain via the TUI, it is broken.  Select OK and save the changes</li>
<li>On the command line enter the following command:</li>
</ul>
<p> </p>
<p>        /usr/bin/net ads join –U <user with AD admin credentials></p>
<p> </p>
<p>To test AD connectivity:</p>
<p>       wbinfo –t</p>
<p> </p>
<p>To see if an AD user can be found:</p>
<p>       wbinfo –i <test AD user></p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">3</p>
</td>
<td width="556" valign="top">
<p>In order to not require that a login be prepended with the domain (IE: DOMAIN\user) modify /etc/samba/smb.conf.  In the [general] section, add:</p>
<p> </p>
<p>        winbind use default domain</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">4</p>
</td>
<td width="556" valign="top">
<p>Enable PAM within satellite.  Edit the file /etc/rhn/rhn.conf and add the following line:</p>
<p>         pam_auth_service = rhn-satellite</p>
<p> </p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">5</p>
</td>
<td width="556" valign="top">
<p>Create the file /etc/pam.d/rhn-satellite and populate with the following text:</p>
<p>         auth sufficient pam_winbind.so</p>
<p>         account sufficient pam_winbind.so</p>
<p>         password sufficient pam_winbind.so use_authtok</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">6</p>
</td>
<td width="556" valign="top">
<p>Restart satellite</p>
<p>        rhn-satellite restart</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">7</p>
</td>
<td width="556" valign="top">
<p>Enable PAM on a per user basis.  In the satellite GUI:</p>
<p><strong>New Users:</strong></p>
<p>         Users->Create New User(use the user’s windows AD login name as the login name)</p>
<p>        Check “Enable PAM”</p>
<p> </p>
<p><strong>Existing Users (assuming existing user’s login matches their AD login):</strong></p>
<p>        Users->Select Username to enable->Check “Enable PAM”</p>
<p>         Click update</p>
</td>
</tr>
<tr>
<td width="91" valign="top">
<p align="center">8</p>
</td>
<td width="556" valign="top">
<p>If winbind is not enabled in NSS for local password file entries or if you do not have enterprise authorization such as LDAP, the user must be created in the local password file.  A script similar to this can create a locked user:</p>

<p> </p>
<p>#!/bin/bash</p>
<p>user="$1"</p>
<p>[ -z "$user" ] && { echo "Usage: addsatuser.sh <username>";exit 1; }</p>
<p>adduser -M -N –g nobody $user && passwd -l $user</p>
<p> </p>
<p> </p>
</td>
</tr>
</tbody>
</table><div><div class="h5">
<p> </p>
<p>On 2013-07-17 8:42, Wimpelberg, Matthew wrote:</p>
</div></div><blockquote type="cite" style="padding-left:5px;border-left:#1010ff 2px solid;margin-left:5px;width:100%"><div><div class="h5">
<div>
<p class="MsoNormal"><span style="color:#1f497d;font-family:Calibri;font-size:small"><span style="font-size:11.0pt;font-family:'Calibri','sans-serif';color:#1f497d">I am using AD though not LDAP</span></span></p>

<p class="MsoNormal"><span style="color:#1f497d;font-family:Calibri;font-size:small"><span style="font-size:11.0pt;font-family:'Calibri','sans-serif';color:#1f497d"> </span></span></p>
<p class="MsoNormal"><strong><span style="font-family:Tahoma;font-size:small"><span style="font-size:10.0pt;font-family:'Tahoma','sans-serif';font-weight:bold">From:</span></span></strong><span style="font-family:Tahoma;font-size:small"><span style="font-size:10.0pt;font-family:'Tahoma','sans-serif'"> <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a> [mailto:<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>] <strong><span style="font-weight:bold">On Behalf Of </span></strong>Jens Neu<br>
<strong><span style="font-weight:bold">Sent:</span></strong> Wednesday, July 17, 2013 8:37 AM<br><strong><span style="font-weight:bold">To:</span></strong> <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
<strong><span style="font-weight:bold">Subject:</span></strong> Re: [Spacewalk-list] Active Directory and Spacewalk</span></span></p>
<p class="MsoNormal"><span style="font-family:Times New Roman;font-size:medium"><span style="font-size:12.0pt"> </span></span></p>
<p class="MsoNormal"><tt><span style="font-family:Courier New;font-size:small"><span style="font-size:10.0pt">> I have setup winbind on my server and am able to list all of my </span></span></tt><span style="font-family:Courier New;font-size:small"><span style="font-size:10.0pt;font-family:'Courier New'"><br>
<tt><span style="font-family:Courier New">> Active Directory Users.  I have created a user in spacewalk AD</span></tt><br><tt><span style="font-family:Courier New">> \username and am unable to login as this user on the webconsole.  </span></tt><br>
<tt><span style="font-family:Courier New">> What am I doing wrong?</span></tt><br></span></span><br><a href="https://fedorahosted.org/spacewalk/wiki/SpacewalkWithLDAP" target="_blank"><tt><span style="font-family:Courier New;font-size:small"><span style="font-size:10.0pt">https://fedorahosted.org/spacewalk/wiki/SpacewalkWithLDAP</span></span></tt></a><br>
<br><tt><span style="font-family:Courier New;font-size:small"><span style="font-size:10.0pt">regards</span></span></tt><br><tt><span style="font-family:Courier New;font-size:small"><span style="font-size:10.0pt">Jens</span></span></tt><span style="font-family:Verdana;font-size:xx-small"><span style="font-size:7.5pt;font-family:'Verdana','sans-serif'"><br>
<br><a href="http://www.biotronik.com" target="_blank">www.biotronik.com</a></span></span><span style="font-family:Arial"><span style="font-family:'Arial','sans-serif'"></span></span></p>
<div class="MsoNormal" style="text-align:center" align="center"><hr style="color:#003579" width="100%" size="1" align="center"></div>
<p class="MsoNormal"><span style="font-family:Arial;font-size:medium"><span style="font-size:12.0pt;font-family:'Arial','sans-serif'"><br><img alt="" width="125" height="75" border="0"><br><br></span></span><strong><span style="color:#003579;font-family:Verdana;font-size:small"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif';color:#003579;font-weight:bold">BIOTRONIK</span></span></strong><span style="color:#003579;font-family:Verdana;font-size:small"><span style="font-size:10.0pt;font-family:'Verdana','sans-serif';color:#003579"> - Celebrating 50 years of excellence<br>
<br> Founded in 1963 with the development of the first German pacemaker, BIOTRONIK has brought innovations and the highest quality standards to the cardiac rhythm management and vascular intervention fields in more than 100 countries around the world. We’ve developed advanced technologies such as BIOTRONIK Home Monitoring®, Closed Loop Stimulation (CLS) and Orsiro, the industry's first hybrid drug eluting stent. BIOTRONIK also offers the broadest portfolio of cardiac devices with ProMRI®, an advanced technology that gives patients access to magnetic resonance (MR) scanning.</span></span><span style="font-family:Arial"><span style="font-family:'Arial','sans-serif'"></span></span></p>

<div class="MsoNormal" style="text-align:center" align="center"><hr style="color:#003579" width="100%" size="1" align="center"></div>
<p class="MsoNormal"><span style="color:#003579;font-family:Verdana;font-size:xx-small"><span style="font-size:7.5pt;font-family:'Verdana','sans-serif';color:#003579">BIOTRONIK SE & Co. KG<br> Woermannkehre 1, 12359 Berlin, Germany<br>
 Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRA 6501<br><br> Vertreten durch ihre Komplementärin:<br> BIOTRONIK MT SE<br> Sitz der Gesellschaft: Berlin, Registergericht: Berlin HRB 118866 B<br> Geschäftsführende Direktoren: Christoph Böhmer, Dr. Lothar Krings</span></span></p>

<div class="MsoNormal" style="text-align:center" align="center"><hr style="color:#003579" width="100%" size="1" align="center"></div>
<p class="MsoNormal"><span style="color:#003579;font-family:Verdana;font-size:xx-small"><span style="font-size:7.5pt;font-family:'Verdana','sans-serif';color:#003579">This e-mail and the information it contains including attachments are confidential and meant only for use by the intended recipient(s); disclosure or copying is strictly prohibited. If you are not addressed, but in the possession of this e-mail, please notify the sender immediately and delete the document.</span></span></p>

</div>
<p> </p>
<p> </p>
<hr>
<p> </p>
<p>The information contained in this communication is confidential and may contain information that is privileged or exempt from disclosure under applicable law. If you are not a named addressee, please notify the sender immediately and delete this email from your system.  If you have received this communication, and are not a named recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.</p>

<hr><br>
<p> </p>
<br>
</div></div><div class="im"><pre>_______________________________________________
Spacewalk-list mailing list
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a>
</pre>
</div></blockquote>
<div> </div>
</div>
<br>_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br></blockquote></div><br></div>