I just saw some posts saying pam_krb winbind could be needed to get pam work against active directory. Is this true? The post I was following actually is for a LDAP server not Active Directory.<br><br><div class="gmail_quote">
On Mon, Nov 23, 2009 at 2:49 PM, Hailu Meng <span dir="ltr"><<a href="mailto:hailumeng@gmail.com">hailumeng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think I need put my pam configuration here:<br><br>I followed this post <a href="http://www.shrubbery.net/pipermail/tac_plus/2009-January/000332.html" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/2009-January/000332.html</a> to configure my pam module:<br>
<br>/etc/pam.d/tacacs<div class="im"><br>auth include system-auth<br>account required pam_nologin.so<br>account include system-auth<br>password include system-auth<br>session optional pam_keyinit.so force revoke<br>
session include system-auth<br>session required pam_loginuid.so<br><br>/etc/pam.d/system-auth<br>#%PAM-1.0<br># This file is auto-generated.<br># User changes will be destroyed the next time authconfig is run.<br>
auth required pam_env.so<br>auth sufficient pam_unix.so nullok try_first_pass<br>auth requisite pam_succeed_if.so uid >= 500 quiet<br>auth sufficient pam_ldap.so use_first_pass<br>
auth required pam_deny.so<br><br>account required pam_unix.so broken_shadow<br></div>account sufficient pam_succeed_if.so uid < 500 quiet<div class="im"><br>account [default=bad success=ok user_unknown=ignore] pam_ldap.so<br>
account required pam_permit.so<br><br>password requisite pam_cracklib.so try_first_pass retry=3<br>password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok<br>password sufficient pam_ldap.so use_authtok<br>
password required pam_deny.so<br><br>session optional pam_keyinit.so revoke<br>session required pam_limits.so<br>session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid<br>
session required pam_unix.so<br></div>session optional pam_ldap.so<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Mon, Nov 23, 2009 at 2:33 PM, Hailu Meng <span dir="ltr"><<a href="mailto:hailumeng@gmail.com" target="_blank">hailumeng@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi John,<br><br>You mean issue commands like tac_plus -C /etct/tac_plus.conf -L -p 49 -d 16 -d 256 -g ? -d 16 -d 256 side by side? It didn't make any change. I got same log info. By the way, I also saw the log info in /var/log/message:<br>
Nov 23 14:24:25 NMS tac_plus[3676]: Reading config<br>Nov 23 14:24:25 NMS tac_plus[3676]: Version F4.0.4.19 Initialized 1<br>Nov 23 14:24:29 NMS tac_plus[3676]: connect from 10.1.69.89 [10.1.69.89]<br>Nov 23 14:24:37 NMS tac_plus[3676]: login query for 'myuser' tty0 from 10.1.69.89 rejected<br>
Nov 23 14:24:37 NMS tac_plus[3676]: login failure: myuser 10.1.69.89 (10.1.69.89) tty0<br><br>Do we have option to see the log about PAM? I haven't found where it is. if we can check the log of PAM, then we could find something useful. Right now the log of tac_plus didn't tell too much about why login got failure.<br>
<br>Lou<br><br><div class="gmail_quote"><div><div></div><div>On Mon, Nov 23, 2009 at 2:20 PM, john heasley <span dir="ltr"><<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Mon, Nov 23, 2009 at 12:43:00PM -0600, Hailu Meng:<br>
<div>> Thanks John for helping me check this issue.<br>
><br>
> I just run tac_plus -C /path/to/tac_plus.conf -L -p 49 -d256 -g to see the<br>
<br>
</div>try -d 16 -d 256. which i think will log the pwd that pam received from<br>
the device. make its correct. the logs below do appear to be a reject/fail<br>
returned from pam.<br>
</div></div><div><div></div><div><div><div></div><div><br>
> log in stdout and in log file. I can't see any suspicious log information<br>
> here. I paste the log below:<br>
><br>
><br>
> Sat Nov 21 22:28:22 2009 [3393]: Waiting for packet<br>
> Sat Nov 21 22:28:27 2009 [3393]: Read AUTHEN/CONT size=23<br>
> Sat Nov 21 22:28:27 2009 [3393]: PACKET: key=mykey<br>
> Sat Nov 21 22:28:27 2009 [3393]: version 192 (0xc0), type 1, seq no 5, flags<br>
> 0x1<br>
> Sat Nov 21 22:28:27 2009 [3393]: session_id 3295176910 (0xc46868ce), Data<br>
> length<br>
> 11 (0xb)<br>
> Sat Nov 21 22:28:27 2009 [3393]: End header<br>
> Sat Nov 21 22:28:27 2009 [3393]: type=AUTHEN/CONT<br>
> Sat Nov 21 22:28:27 2009 [3393]: user_msg_len 6 (0x6), user_data_len 0 (0x0)<br>
> Sat Nov 21 22:28:27 2009 [3393]: flags=0x0<br>
> Sat Nov 21 22:28:27 2009 [3393]: User msg:<br>
> Sat Nov 21 22:28:27 2009 [3393]: myusername<br>
> Sat Nov 21 22:28:27 2009 [3393]: User data:<br>
> Sat Nov 21 22:28:27 2009 [3393]: End packet<br>
> Sat Nov 21 22:28:27 2009 [3393]: choose_authen chose default_fn<br>
> Sat Nov 21 22:28:27 2009 [3393]: Calling authentication function<br>
> Sat Nov 21 22:28:27 2009 [3393]: Writing AUTHEN/GETPASS size=28<br>
> Sat Nov 21 22:28:27 2009 [3393]: PACKET: key=mykey<br>
> Sat Nov 21 22:28:27 2009 [3393]: version 192 (0xc0), type 1, seq no 6, flags<br>
> 0x1<br>
> Sat Nov 21 22:28:27 2009 [3393]: session_id 3295176910 (0xc46868ce), Data<br>
> length<br>
> 16 (0x10)<br>
> Sat Nov 21 22:28:27 2009 [3393]: End header<br>
> Sat Nov 21 22:28:27 2009 [3393]: type=AUTHEN status=5 (AUTHEN/GETPASS)<br>
> flags=0x1<br>
> Sat Nov 21 22:28:27 2009 [3393]: msg_len=10, data_len=0<br>
> Sat Nov 21 22:28:27 2009 [3393]: msg:<br>
> Sat Nov 21 22:28:27 2009 [3393]: Password:<br>
> Sat Nov 21 22:28:27 2009 [3393]: data:<br>
> Sat Nov 21 22:28:27 2009 [3393]: End packet<br>
> Sat Nov 21 22:28:27 2009 [3393]: Waiting for packet<br>
> Sat Nov 21 22:28:34 2009 [3393]: Read AUTHEN/CONT size=30<br></div></div>
> Sat Nov 21 22:28:34 2009 [3393]: PACKET: key=mykey<div><div></div><div><br>
> Sat Nov 21 22:28:34 2009 [3393]: version 192 (0xc0), type 1, seq no 7, flags<br>
> 0x1<br>
> Sat Nov 21 22:28:34 2009 [3393]: session_id 3295176910 (0xc46868ce), Data<br>
> length<br>
> 18 (0x12)<br>
> Sat Nov 21 22:28:34 2009 [3393]: End header<br>
> Sat Nov 21 22:28:34 2009 [3393]: type=AUTHEN/CONT<br>
> Sat Nov 21 22:28:34 2009 [3393]: user_msg_len 13 (0xd), user_data_len 0<br>
> (0x0)<br>
> Sat Nov 21 22:28:34 2009 [3393]: flags=0x0<br>
> Sat Nov 21 22:28:34 2009 [3393]: User msg:<br>
> Sat Nov 21 22:28:34 2009 [3393]: mypassword<br>
> Sat Nov 21 22:28:34 2009 [3393]: User data:<br>
> Sat Nov 21 22:28:34 2009 [3393]: End packet<br>
> Sat Nov 21 22:28:36 2009 [3393]: login query for 'myusername' tty0 from<br>
> 10.1.69.89 r<br>
> ejected<br>
> Sat Nov 21 22:28:36 2009 [3393]: login failure: myusername 10.1.69.89<br>
> (10.1.69.89) t<br>
> ty0<br>
> Sat Nov 21 22:28:36 2009 [3393]: Writing AUTHEN/FAIL size=18<br>
> Sat Nov 21 22:28:36 2009 [3393]: PACKET: key=mykey<br>
> Sat Nov 21 22:28:36 2009 [3393]: version 192 (0xc0), type 1, seq no 8, flags<br>
> 0x1<br>
> Sat Nov 21 22:28:36 2009 [3393]: session_id 3295176910 (0xc46868ce), Data<br>
> length<br>
> 6 (0x6)<br>
> Sat Nov 21 22:28:36 2009 [3393]: End header<br>
> Sat Nov 21 22:28:36 2009 [3393]: type=AUTHEN status=2 (AUTHEN/FAIL)<br>
> flags=0x0<br>
> Sat Nov 21 22:28:36 2009 [3393]: msg_len=0, data_len=0<br>
> Sat Nov 21 22:28:36 2009 [3393]: msg:<br>
> Sat Nov 21 22:28:36 2009 [3393]: data:<br>
> Sat Nov 21 22:28:36 2009 [3393]: End packet<br>
> Sat Nov 21 22:28:36 2009 [3393]: <a href="http://10.1.69.89" target="_blank">10.1.69.89</a>: disconnect<br>
><br>
><br>
><br>
> On Mon, Nov 23, 2009 at 12:23 PM, john heasley <<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>> wrote:<br>
><br>
> > Mon, Nov 23, 2009 at 12:12:58PM -0600, Hailu Meng:<br>
> > > Hi Adam,<br>
> > ><br>
> > > If the ldapsearch -D "" -w "" runs successfully, what do we suppose to<br>
> > get<br>
> > > from the output? I just got all of the user information in that group.<br>
> > Does<br>
> > > that means my password and username got authenticated successfully<br>
> > against<br>
> > > AD?<br>
> > ><br>
> > > This thing drives me crazy. I need solve it through this week before the<br>
> > > holiday...<br>
> ><br>
> > i havent followed this thread, as i know nearly zero about ldap. but,<br>
> > have you enabled authentication debugging in the tacacas daemon and<br>
> > checked the logs to determine what is coming back from pam? it very<br>
> > well may be that the ldap client is working just fine, but there is a<br>
> > pam module bug or a bug in the tacplus daemon or that your device<br>
> > simply doesnt like something about the replies.<br>
> ><br>
> > > Thanks a lot for the help.<br>
> > ><br>
> > > Lou<br>
> > ><br>
> > > On Fri, Nov 20, 2009 at 7:26 AM, Hailu Meng <<a href="mailto:hailumeng@gmail.com" target="_blank">hailumeng@gmail.com</a>> wrote:<br>
> > ><br>
> > > > Still no clue how to turn on the log. binding seems good. See my<br>
> > findings<br>
> > > > below. Thanks a lot.<br>
> > > ><br>
> > > > On Thu, Nov 19, 2009 at 9:26 PM, adam <<a href="mailto:prozaconstilts@gmail.com" target="_blank">prozaconstilts@gmail.com</a>><br>
> > wrote:<br>
> > > ><br>
> > > >> Hailu Meng wrote:<br>
> > > >><br>
> > > >>> Adam,<br>
> > > >>><br>
> > > >>> I tried the su - "userid" in my tacacs+ server but I don't have that<br>
> > > >>> userid in CentOS. So the CentOS just don't want me log in. I think<br>
> > this will<br>
> > > >>> not ask tacacs server to authenticate against AD.<br>
> > > >>><br>
> > > >><br>
> > > >> You shouldn't need to have to define the user in CentOS, that's the<br>
> > point<br>
> > > >> of using ldap for authentication. The user is defined in ldap, not in<br>
> > > >> CentOS. Now that I think about it, su - <user> probably wouldn't work<br>
> > > >> anyway, as AD doesn't by default have the data needed by a linux box<br>
> > to<br>
> > > >> allow login...but see below for more options.<br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >>> Is there any other way to test ldap authentication against AD with<br>
> > the<br>
> > > >>> userid in AD? I tried ldapsearch. It did find my user id without<br>
> > problem.<br>
> > > >>> But I haven't found any option to try with password and authenticate<br>
> > against<br>
> > > >>> AD.<br>
> > > >>><br>
> > > >><br>
> > > >> Try using -D:<br>
> > > >><br>
> > > >> from `man ldapsearch`:<br>
> > > >><br>
> > > >> -D binddn<br>
> > > >> Use the Distinguished Name binddn to bind to the LDAP directory.<br>
> > > >><br>
> > > >> so -D cn=username,ou=my_ou,dc=my_dc should let you try to authenticate<br>
> > > >> using whatever user you want to define. Just check and double check<br>
> > you get<br>
> > > >> the right path in that dn.<br>
> > > >><br>
> > > >><br>
> > > >> I tried -D " cn=username,ou=my_ou,dc=my_dc " but it just returned lots<br>
> > of<br>
> > > > users' information. It means successful?<br>
> > > ><br>
> > > ><br>
> > > >> Do you have ldap server setup or only the openldap library and<br>
> > openldap<br>
> > > >>> client? I don't understand why the log is not turned on. There must<br>
> > be some<br>
> > > >>> debugging info in the log which can help solve this issue.<br>
> > > >>><br>
> > > >><br>
> > > >> only the libs and client. You should not need the server. In the<br>
> > > >> ldapsearch, you can use -d <integer> to get debugging info for that<br>
> > search.<br>
> > > >> As before, higher number = more debug<br>
> > > >><br>
> > > >><br>
> > > >> If the user can authenticate, does ethereal capture some packets<br>
> > about<br>
> > > >>> password verification? Right now I only see the packets when ldap<br>
> > search for<br>
> > > >>> my user id and gets results back from AD.<br>
> > > >>><br>
> > > >><br>
> > > >> Ethereal should catch all data flowing between the client and server.<br>
> > If<br>
> > > >> you can search out the user in your AD right now, then one of two<br>
> > things is<br>
> > > >> happening:<br>
> > > >><br>
> > > >> 1. You are performing anonymous searches. In this case, no username<br>
> > and pw<br>
> > > >> is provided, and your AD is happy to hand over info to anyone who asks<br>
> > for<br>
> > > >> it. If this is the case, you will _not_ see authentication<br>
> > information. The<br>
> > > >> following MS KB article should probably help you determine on your AD<br>
> > if<br>
> > > >> anonymous queries are allowed:<br>
> > > >><br>
> > > >> <a href="http://support.microsoft.com/kb/320528" target="_blank">http://support.microsoft.com/kb/320528</a><br>
> > > >><br>
> > > >> It has exact instructions for how to get it going, but you can follow<br>
> > > >> along with it to check your current settings without making any<br>
> > changes.<br>
> > > >><br>
> > > ><br>
> > > > I checked our setting. Permission type for normal user is "Read &<br>
> > Execute".<br>
> > > > I click edit to check the detail about permission. I think it only<br>
> > allow the<br>
> > > > user to read the attributes, permission something and can't modify the<br>
> > > > AD.There is "Everyone" setting is also set as "Read & Execute". By the<br>
> > way,<br>
> > > > the AD is Win2003 R2.<br>
> > > ><br>
> > > ><br>
> > > >><br>
> > > >> 2. Authentication is happening. It will be the _very_ first thing the<br>
> > > >> client and server perform, after basic connection establishment. Look<br>
> > for it<br>
> > > >> at the very beginning of a dump.<br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >> Also, it's a bit overkill, but the following article is extremely<br>
> > > >> informative about all the different ways you can plug linux into AD<br>
> > for<br>
> > > >> authentication. It might offer some hints...<br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >>> Maybe I need dig into ldap.conf more. If you have any idea, let me<br>
> > know.<br>
> > > >>><br>
> > > >>> Thank you very much.<br>
> > > >>><br>
> > > >>> Lou<br>
> > > >>><br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > ><br>
> > > -------------- next part --------------<br>
> > > An HTML attachment was scrubbed...<br>
> > > URL:<br>
> > <a href="http://www.shrubbery.net/pipermail/tac_plus/attachments/20091123/bba3d7fb/attachment.html" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/attachments/20091123/bba3d7fb/attachment.html</a><br>
> > > _______________________________________________<br>
> > > tac_plus mailing list<br>
> > > <a href="mailto:tac_plus@shrubbery.net" target="_blank">tac_plus@shrubbery.net</a><br>
> > > <a href="http://www.shrubbery.net/mailman/listinfo.cgi/tac_plus" target="_blank">http://www.shrubbery.net/mailman/listinfo.cgi/tac_plus</a><br>
> ><br>
</div></div></div></div></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>