now im not an expert on this however I do run a samba server which pulls the user names from my AD controller. Have you tried using winbind plus pam for the AD authentication ??<br><br><a href="http://wiki.samba.org/index.php/Samba_&_Active_Directory">http://wiki.samba.org/index.php/Samba_&_Active_Directory</a> I used this for my samba install but you could get the idea of how winbind and Kerberos would work. It might give you more luck <br>
<br><div class="gmail_quote">On Tue, Nov 24, 2009 at 12:56 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;">
John,<br>
<br>
I checked my tac_plus configuration for PAM module. the file<br>
/etc/pam.d/tac_plus. The current configuration is shown below:<br>
As you suggest I need put pam_ldap.so on the first row for every<br>
auth,account,password and session, right?<br>
<br>
*******************************************************************<br>
<div class="im">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_localuser.so<br>
<div class="im">account sufficient pam_succeed_if.so uid < 500 quiet<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<br>
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<br>
quiet use_uid<br>
session required pam_unix.so<br>
session optional pam_ldap.so<br>
<br>
<br>
</div><div><div></div><div class="h5">On Tue, Nov 24, 2009 at 11:36 AM, john heasley <<a href="mailto:heas@shrubbery.net">heas@shrubbery.net</a>> wrote:<br>
<br>
> Tue, Nov 24, 2009 at 11:05:59AM -0600, Hailu Meng:<br>
> > It makes sense. nsswitch.conf should be for like local login not for<br>
> tacacs.<br>
> > Thanks John to point it out. I'm such a rookie to these things. Just<br>
> > followed some guides and combine them here. Need study more.<br>
><br>
> well, it depends upon what modules you use in your tacacs PAM config; ie:<br>
> if you have something like 'require unix_account' (WAG) that requires that<br>
> the login exist in /etc/passwd (or more precisely get_pwent(3) or similar),<br>
> then /etc/nsswitch.conf might affect it. BUT, that means that for you,<br>
> 'require unix_account' is a misconfiguration of the tacacs PAM config.<br>
> that<br>
> is should be something like 'require ldap_account'.<br>
><br>
><br>
> > Lou<br>
> ><br>
> > On Tue, Nov 24, 2009 at 10:24 AM, john heasley <<a href="mailto:heas@shrubbery.net">heas@shrubbery.net</a>><br>
> wrote:<br>
> ><br>
> > > Tue, Nov 24, 2009 at 11:11:57AM +0100, Jeroen Nijhof:<br>
> > > ><br>
> > > > Hi Lou,<br>
> > > ><br>
> > > > Yes, most server application's check if a user exist by looking up<br>
> the<br>
> > > > uid via nss before doing any authentication (i.e. sshd).<br>
> > > ><br>
> > > > Regards,<br>
> > > > Jeroen<br>
> > > ><br>
> > > > Op 23/11/2009 schreef "Hailu Meng" <<a href="mailto:hailumeng@gmail.com">hailumeng@gmail.com</a>>:<br>
> > > ><br>
> > > > >Hi Jeroen,<br>
> > > > ><br>
> > > > >Thanks for helping. I modified the nssswitch.conf as below:<br>
> > > > >passwd: files ldap<br>
> > > > >shadow: files ldap<br>
> > > > >group: files ldap<br>
> > > > ><br>
> > > > >And leave the other settings as default.<br>
> > > > ><br>
> > > > >the user attributes you are talking about are the attributes<br>
> retrieving<br>
> > > from<br>
> > > > >AD? I do see the packets from AD server told my tacacs+ server the<br>
> user<br>
> > > > >attributes including homedir.<br>
> > ><br>
> > > i would not expect this to affect tacacs, unless you have something in<br>
> your<br>
> > > pam config that requires it. ie: nsswitch.conf should control auth for<br>
> the<br>
> > > host (eg: /sbin/login), tacacs is separate.<br>
> > ><br>
> > > > >Thanks.<br>
> > > > ><br>
> > > > >Lou<br>
> > > > ><br>
> > > > ><br>
> > > > >On Mon, Nov 23, 2009 at 4:45 PM, Jeroen Nijhof <<a href="mailto:jeroen@nijhofnet.nl">jeroen@nijhofnet.nl</a><br>
> ><br>
> > > wrote:<br>
> > > > ><br>
> > > > >> Hi,<br>
> > > > >><br>
> > > > >> Did you setup the nsswitch.conf as well on your tac_plus server?<br>
> > > > >> Your tac_plus server needs to lookup the user attributes like<br>
> homedir<br>
> > > > >> etc, otherwise pam will fail.<br>
> > > > >><br>
> > > > >> Regards,<br>
> > > > >> Jeroen Nijhof<br>
> > > > >><br>
> > > > >> On Mon, 2009-11-23 at 15:28 -0600, Hailu Meng wrote:<br>
> > > > >> > Ok. With -d 32, I got some more info about pam as red color log.<br>
> > > > >> ><br>
> > > > >> > There is "Unknown user" log info following the input of my user<br>
> > > password.<br>
> > > > >> > Feel confused since ldap is able to get user info from Active<br>
> > > directory,<br>
> > > > >> why<br>
> > > > >> > it turns out "Unknown user" here.<br>
> > > > >> ><br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Read AUTHEN/CONT size=23<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: PACKET: key=mykey<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: version 192 (0xc0), type 1, seq<br>
> no<br>
> > > 3,<br>
> > > > >> flags<br>
> > > > >> > 0x1<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: session_id 3197597252<br>
> (0xbe977644),<br>
> > > Data<br>
> > > > >> > length 11 (0xb)<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: End header<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: type=AUTHEN/CONT<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: user_msg_len 6 (0x6),<br>
> user_data_len<br>
> > > 0<br>
> > > > >> (0x0)<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: flags=0x0<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: User msg:<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: myusername<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: User data:<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: End packet<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: choose_authen chose default_fn<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Calling authentication function<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: pam_verify myusername<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: pam_tacacs received 1<br>
> pam_messages<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Error 10.1.69.89 tty0:<br>
> > > > >> PAM_PROMPT_ECHO_OFF<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Writing AUTHEN/GETPASS size=28<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: PACKET: key=mykey<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: version 192 (0xc0), type 1, seq<br>
> no<br>
> > > 4,<br>
> > > > >> flags<br>
> > > > >> > 0x1<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: session_id 3197597252<br>
> (0xbe977644),<br>
> > > Data<br>
> > > > >> > length 16 (0x10)<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: End header<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: type=AUTHEN status=5<br>
> > > (AUTHEN/GETPASS)<br>
> > > > >> > flags=0x1<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: msg_len=10, data_len=0<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: msg:<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Password:<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: data:<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: End packet<br>
> > > > >> > Mon Nov 23 15:21:16 2009 [3806]: Waiting for packet<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: Read AUTHEN/CONT size=30<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: PACKET: key=mykey<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: version 192 (0xc0), type 1, seq<br>
> no<br>
> > > 5,<br>
> > > > >> flags<br>
> > > > >> > 0x1<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: session_id 3197597252<br>
> (0xbe977644),<br>
> > > Data<br>
> > > > >> > length 18 (0x12)<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: End header<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: type=AUTHEN/CONT<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: user_msg_len 13 (0xd),<br>
> > > user_data_len 0<br>
> > > > >> > (0x0)<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: flags=0x0<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: User msg:<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: mypassword<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: User data:<br>
> > > > >> > Mon Nov 23 15:21:21 2009 [3806]: End packet<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: Unknown user<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: login query for 'myusername'<br>
> tty0<br>
> > > from<br>
> > > > >> > 10.1.69.89 rejected<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: login failure:<br>
> myusername10.1.69.89<br>
> > > > >> > (10.1.69.89) tty0<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: Writing AUTHEN/FAIL size=18<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: PACKET: key=mykey<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: version 192 (0xc0), type 1, seq<br>
> no<br>
> > > 6,<br>
> > > > >> flags<br>
> > > > >> > 0x1<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: session_id 3197597252<br>
> (0xbe977644),<br>
> > > Data<br>
> > > > >> > length 6 (0x6)<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: End header<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: type=AUTHEN status=2<br>
> (AUTHEN/FAIL)<br>
> > > > >> > flags=0x0<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: msg_len=0, data_len=0<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: msg:<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: data:<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: End packet<br>
> > > > >> > Mon Nov 23 15:21:22 2009 [3806]: <a href="http://10.1.69.89" target="_blank">10.1.69.89</a>: disconnect<br>
> > > > >> ><br>
> > > > >> ><br>
> > > > >> > On Mon, Nov 23, 2009 at 3:16 PM, john heasley <<br>
> <a href="mailto:heas@shrubbery.net">heas@shrubbery.net</a>><br>
> > > > >> wrote:<br>
> > > > >> ><br>
> > > > >> > > Mon, Nov 23, 2009 at 03:12:53PM -0600, Hailu Meng:<br>
> > > > >> > > > I just saw some posts saying pam_krb winbind could be needed<br>
> to<br>
> > > get<br>
> > > > >> pam<br>
> > > > >> > > work<br>
> > > > >> > > > against active directory. Is this true? The post I was<br>
> following<br>
> > > > >> actually<br>
> > > > >> > > is<br>
> > > > >> > > > for a LDAP server not Active Directory.<br>
> > > > >> > ><br>
> > > > >> > > i dont know; each pam implementation seems to be [at least]<br>
> > > slightly<br>
> > > > >> > > different. seems silly to need kerberos for ldap.<br>
> > > > >> > ><br>
> > > > >> > > > On Mon, Nov 23, 2009 at 2:49 PM, Hailu Meng <<br>
> > > <a href="mailto:hailumeng@gmail.com">hailumeng@gmail.com</a>><br>
> > > > >> wrote:<br>
> > > > >> > > ><br>
> > > > >> > > > > I think I need put my pam configuration here:<br>
> > > > >> > > > ><br>
> > > > >> > > > > I followed this post<br>
> > > > >> > > > ><br>
> > > > >><br>
> > > <a href="http://www.shrubbery.net/pipermail/tac_plus/2009-January/000332.htmlto" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/2009-January/000332.htmlto</a><br>
> > > > >> > > > > configure my pam module:<br>
> > > > >> > > > ><br>
> > > > >> > > > > /etc/pam.d/tacacs<br>
> > > > >> > > > ><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<br>
> is<br>
> > > run.<br>
> > > > >> > > > > auth required pam_env.so<br>
> > > > >> > > > > auth sufficient pam_unix.so nullok<br>
> try_first_pass<br>
> > > > >> > > > > auth requisite pam_succeed_if.so uid >= 500<br>
> 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>
> > > > >> > > > > account sufficient pam_succeed_if.so uid < 500<br>
> quiet<br>
> > > > >> > > > ><br>
> > > > >> > > > > account [default=bad success=ok user_unknown=ignore]<br>
> > > > >> pam_ldap.so<br>
> > > > >> > > > > account required pam_permit.so<br>
> > > > >> > > > ><br>
> > > > >> > > > > password requisite pam_cracklib.so try_first_pass<br>
> > > retry=3<br>
> > > > >> > > > > password sufficient pam_unix.so md5 shadow nullok<br>
> > > > >> try_first_pass<br>
> > > > >> > > > > 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<br>
> > > service in<br>
> > > > >> > > crond<br>
> > > > >> > > > > quiet use_uid<br>
> > > > >> > > > > session required pam_unix.so<br>
> > > > >> > > > > session optional pam_ldap.so<br>
> > > > >> > > > ><br>
> > > > >> > > > ><br>
> > > > >> > > > > On Mon, Nov 23, 2009 at 2:33 PM, Hailu Meng <<br>
> > > <a href="mailto:hailumeng@gmail.com">hailumeng@gmail.com</a>><br>
> > > > >> > > wrote:<br>
> > > > >> > > > ><br>
> > > > >> > > > >> Hi John,<br>
> > > > >> > > > >><br>
> > > > >> > > > >> You mean issue commands like tac_plus -C<br>
> /etct/tac_plus.conf<br>
> > > -L -p<br>
> > > > >> 49<br>
> > > > >> > > -d<br>
> > > > >> > > > >> 16 -d 256 -g ? -d 16 -d 256 side by side? It didn't make<br>
> any<br>
> > > > >> change. I<br>
> > > > >> > > got<br>
> > > > >> > > > >> same log info. By the way, I also saw the log info in<br>
> > > > >> > > /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<br>
> > > Initialized<br>
> > > > >> 1<br>
> > > > >> > > > >> Nov 23 14:24:29 NMS tac_plus[3676]: connect from<br>
> 10.1.69.89<br>
> > > > >> > > [10.1.69.89]<br>
> > > > >> > > > >> Nov 23 14:24:37 NMS tac_plus[3676]: login query for<br>
> 'myuser'<br>
> > > tty0<br>
> > > > >> from<br>
> > > > >> > > > >> 10.1.69.89 rejected<br>
> > > > >> > > > >> Nov 23 14:24:37 NMS tac_plus[3676]: login failure: myuser<br>
> > > > >> 10.1.69.89<br>
> > > > >> > > > >> (10.1.69.89) tty0<br>
> > > > >> > > > >><br>
> > > > >> > > > >> Do we have option to see the log about PAM? I haven't<br>
> found<br>
> > > where<br>
> > > > >> it<br>
> > > > >> > > is.<br>
> > > > >> > > > >> if we can check the log of PAM, then we could find<br>
> something<br>
> > > > >> useful.<br>
> > > > >> > > Right<br>
> > > > >> > > > >> now the log of tac_plus didn't tell too much about why<br>
> login<br>
> > > got<br>
> > > > >> > > failure.<br>
> > > > >> > ><br>
> > > > >> > > add -d 32. -d x -d y ... will be logically OR'd together.<br>
> > > > >> > ><br>
> > > > >> > > > >> Lou<br>
> > > > >> > > > >><br>
> > > > >> > > > >> On Mon, Nov 23, 2009 at 2:20 PM, john heasley <<br>
> > > <a href="mailto:heas@shrubbery.net">heas@shrubbery.net</a><br>
> > > > >> ><br>
> > > > >> > > wrote:<br>
> > > > >> > > > >><br>
> > > > >> > > > >>> Mon, Nov 23, 2009 at 12:43:00PM -0600, Hailu Meng:<br>
> > > > >> > > > >>> > Thanks John for helping me check this issue.<br>
> > > > >> > > > >>> ><br>
> > > > >> > > > >>> > I just run tac_plus -C /path/to/tac_plus.conf -L -p 49<br>
> > > -d256 -g<br>
> > > > >> to<br>
> > > > >> > > see<br>
> > > > >> > > > >>> the<br>
> > > > >> > > > >>><br>
> > > > >> > > > >>> try -d 16 -d 256. which i think will log the pwd that<br>
> pam<br>
> > > > >> received<br>
> > > > >> > > from<br>
> > > > >> > > > >>> the device. make its correct. the logs below do appear<br>
> to<br>
> > > be a<br>
> > > > >> > > > >>> reject/fail<br>
> > > > >> > > > >>> returned from pam.<br>
> > > > >> > > > >>><br>
> > > > >> > > > >>> > log in stdout and in log file. I can't see any<br>
> suspicious<br>
> > > log<br>
> > > > >> > > > >>> 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<br>
> 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),<br>
> type<br>
> > > 1,<br>
> > > > >> seq no<br>
> > > > >> > > 5,<br>
> > > > >> > > > >>> flags<br>
> > > > >> > > > >>> > 0x1<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: session_id 3295176910<br>
> > > > >> > > (0xc46868ce),<br>
> > > > >> > > > >>> 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),<br>
> > > > >> > > user_data_len 0<br>
> > > > >> > > > >>> (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<br>
> > > default_fn<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: Calling<br>
> authentication<br>
> > > > >> function<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: Writing<br>
> AUTHEN/GETPASS<br>
> > > 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),<br>
> type<br>
> > > 1,<br>
> > > > >> seq no<br>
> > > > >> > > 6,<br>
> > > > >> > > > >>> flags<br>
> > > > >> > > > >>> > 0x1<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: session_id 3295176910<br>
> > > > >> > > (0xc46868ce),<br>
> > > > >> > > > >>> 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<br>
> > > > >> > > (AUTHEN/GETPASS)<br>
> > > > >> > > > >>> > flags=0x1<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: msg_len=10,<br>
> 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<br>
> size=30<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:34 2009 [3393]: PACKET: key=mykey<br>
> > > > >> > > > >>><br>
> > > > >> > > > >>> > Sat Nov 21 22:28:34 2009 [3393]: version 192 (0xc0),<br>
> type<br>
> > > 1,<br>
> > > > >> seq no<br>
> > > > >> > > 7,<br>
> > > > >> > > > >>> flags<br>
> > > > >> > > > >>> > 0x1<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:34 2009 [3393]: session_id 3295176910<br>
> > > > >> > > (0xc46868ce),<br>
> > > > >> > > > >>> 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<br>
> (0xd),<br>
> > > > >> > > 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<br>
> > > 'myusername'<br>
> > > > >> tty0<br>
> > > > >> > > from<br>
> > > > >> > > > >>> > 10.1.69.89 r<br>
> > > > >> > > > >>> > ejected<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:36 2009 [3393]: login failure:<br>
> myusername<br>
> > > > >> > > 10.1.69.89<br>
> > > > >> > > > >>> > (10.1.69.89) t<br>
> > > > >> > > > >>> > ty0<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:36 2009 [3393]: Writing AUTHEN/FAIL<br>
> > > 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),<br>
> type<br>
> > > 1,<br>
> > > > >> seq no<br>
> > > > >> > > 8,<br>
> > > > >> > > > >>> flags<br>
> > > > >> > > > >>> > 0x1<br>
> > > > >> > > > >>> > Sat Nov 21 22:28:36 2009 [3393]: session_id 3295176910<br>
> > > > >> > > (0xc46868ce),<br>
> > > > >> > > > >>> 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<br>
> > > > >> (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>:<br>
> disconnect<br>
> > > > >> > > > >>> ><br>
> > > > >> > > > >>> ><br>
> > > > >> > > > >>> ><br>
> > > > >> > > > >>> > On Mon, Nov 23, 2009 at 12:23 PM, john heasley <<br>
> > > > >> <a href="mailto:heas@shrubbery.net">heas@shrubbery.net</a><br>
> > > > >> > > ><br>
> > > > >> > > > >>> 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,<br>
> what<br>
> > > do we<br>
> > > > >> > > suppose<br>
> > > > >> > > > >>> to<br>
> > > > >> > > > >>> > > get<br>
> > > > >> > > > >>> > > > from the output? I just got all of the user<br>
> > > information in<br>
> > > > >> that<br>
> > > > >> > > > >>> group.<br>
> > > > >> > > > >>> > > Does<br>
> > > > >> > > > >>> > > > that means my password and username got<br>
> authenticated<br>
> > > > >> > > successfully<br>
> > > > >> > > > >>> > > against<br>
> > > > >> > > > >>> > > > AD?<br>
> > > > >> > > > >>> > > ><br>
> > > > >> > > > >>> > > > This thing drives me crazy. I need solve it<br>
> through<br>
> > > this<br>
> > > > >> week<br>
> > > > >> > > > >>> before the<br>
> > > > >> > > > >>> > > > holiday...<br>
> > > > >> > > > >>> > ><br>
> > > > >> > > > >>> > > i havent followed this thread, as i know nearly zero<br>
> > > about<br>
> > > > >> ldap.<br>
> > > > >> > > > >>> but,<br>
> > > > >> > > > >>> > > have you enabled authentication debugging in the<br>
> tacacas<br>
> > > > >> daemon<br>
> > > > >> > > and<br>
> > > > >> > > > >>> > > checked the logs to determine what is coming back<br>
> from<br>
> > > pam?<br>
> > > > >> it<br>
> > > > >> > > very<br>
> > > > >> > > > >>> > > well may be that the ldap client is working just<br>
> fine,<br>
> > > but<br>
> > > > >> there<br>
> > > > >> > > is a<br>
> > > > >> > > > >>> > > pam module bug or a bug in the tacplus daemon or<br>
> that<br>
> > > your<br>
> > > > >> 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 <<br>
> > > > >> > > <a href="mailto:hailumeng@gmail.com">hailumeng@gmail.com</a>><br>
> > > > >> > > > >>> wrote:<br>
> > > > >> > > > >>> > > ><br>
> > > > >> > > > >>> > > > > Still no clue how to turn on the log. binding<br>
> seems<br>
> > > good.<br>
> > > > >> See<br>
> > > > >> > > my<br>
> > > > >> > > > >>> > > findings<br>
> > > > >> > > > >>> > > > > below. Thanks a lot.<br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > > On Thu, Nov 19, 2009 at 9:26 PM, adam <<br>
> > > > >> > > <a href="mailto:prozaconstilts@gmail.com">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<br>
> but<br>
> > > I<br>
> > > > >> don't<br>
> > > > >> > > have<br>
> > > > >> > > > >>> that<br>
> > > > >> > > > >>> > > > >>> userid in CentOS. So the CentOS just don't<br>
> want me<br>
> > > log<br>
> > > > >> in.<br>
> > > > >> > > I<br>
> > > > >> > > > >>> think<br>
> > > > >> > > > >>> > > this will<br>
> > > > >> > > > >>> > > > >>> not ask tacacs server to authenticate against<br>
> AD.<br>
> > > > >> > > > >>> > > > >>><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> You shouldn't need to have to define the user<br>
> in<br>
> > > CentOS,<br>
> > > > >> > > that's<br>
> > > > >> > > > >>> the<br>
> > > > >> > > > >>> > > point<br>
> > > > >> > > > >>> > > > >> of using ldap for authentication. The user is<br>
> > > defined in<br>
> > > > >> > > ldap,<br>
> > > > >> > > > >>> not in<br>
> > > > >> > > > >>> > > > >> CentOS. Now that I think about it, su - <user><br>
> > > probably<br>
> > > > >> > > wouldn't<br>
> > > > >> > > > >>> work<br>
> > > > >> > > > >>> > > > >> anyway, as AD doesn't by default have the data<br>
> > > needed by<br>
> > > > >> a<br>
> > > > >> > > linux<br>
> > > > >> > > > >>> box<br>
> > > > >> > > > >>> > > to<br>
> > > > >> > > > >>> > > > >> allow login...but see below for more options.<br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >>> Is there any other way to test ldap<br>
> authentication<br>
> > > > >> against<br>
> > > > >> > > AD<br>
> > > > >> > > > >>> with<br>
> > > > >> > > > >>> > > the<br>
> > > > >> > > > >>> > > > >>> userid in AD? I tried ldapsearch. It did find<br>
> my<br>
> > > user<br>
> > > > >> id<br>
> > > > >> > > > >>> without<br>
> > > > >> > > > >>> > > problem.<br>
> > > > >> > > > >>> > > > >>> But I haven't found any option to try with<br>
> > > password and<br>
> > > > >> > > > >>> 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<br>
> the<br>
> > > LDAP<br>
> > > > >> > > > >>> directory.<br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> so -D cn=username,ou=my_ou,dc=my_dc should let<br>
> you<br>
> > > try<br>
> > > > >> to<br>
> > > > >> > > > >>> authenticate<br>
> > > > >> > > > >>> > > > >> using whatever user you want to define. Just<br>
> check<br>
> > > and<br>
> > > > >> > > double<br>
> > > > >> > > > >>> 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 "<br>
> but it<br>
> > > just<br>
> > > > >> > > > >>> returned lots<br>
> > > > >> > > > >>> > > of<br>
> > > > >> > > > >>> > > > > users' information. It means successful?<br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > >> Do you have ldap server setup or only the<br>
> openldap<br>
> > > > >> library<br>
> > > > >> > > and<br>
> > > > >> > > > >>> > > openldap<br>
> > > > >> > > > >>> > > > >>> client? I don't understand why the log is not<br>
> > > turned<br>
> > > > >> on.<br>
> > > > >> > > There<br>
> > > > >> > > > >>> must<br>
> > > > >> > > > >>> > > be some<br>
> > > > >> > > > >>> > > > >>> debugging info in the log which can help solve<br>
> > > this<br>
> > > > >> issue.<br>
> > > > >> > > > >>> > > > >>><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> only the libs and client. You should not need<br>
> the<br>
> > > > >> server. In<br>
> > > > >> > > the<br>
> > > > >> > > > >>> > > > >> ldapsearch, you can use -d <integer> to get<br>
> > > debugging<br>
> > > > >> info<br>
> > > > >> > > for<br>
> > > > >> > > > >>> that<br>
> > > > >> > > > >>> > > search.<br>
> > > > >> > > > >>> > > > >> As before, higher number = more debug<br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> If the user can authenticate, does ethereal<br>
> > > capture<br>
> > > > >> some<br>
> > > > >> > > > >>> packets<br>
> > > > >> > > > >>> > > about<br>
> > > > >> > > > >>> > > > >>> password verification? Right now I only see<br>
> the<br>
> > > packets<br>
> > > > >> > > when<br>
> > > > >> > > > >>> ldap<br>
> > > > >> > > > >>> > > search for<br>
> > > > >> > > > >>> > > > >>> my user id and gets results back from AD.<br>
> > > > >> > > > >>> > > > >>><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> Ethereal should catch all data flowing between<br>
> the<br>
> > > > >> client<br>
> > > > >> > > and<br>
> > > > >> > > > >>> server.<br>
> > > > >> > > > >>> > > If<br>
> > > > >> > > > >>> > > > >> you can search out the user in your AD right<br>
> now,<br>
> > > then<br>
> > > > >> one<br>
> > > > >> > > of<br>
> > > > >> > > > >>> two<br>
> > > > >> > > > >>> > > things is<br>
> > > > >> > > > >>> > > > >> happening:<br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> 1. You are performing anonymous searches. In<br>
> this<br>
> > > case,<br>
> > > > >> no<br>
> > > > >> > > > >>> username<br>
> > > > >> > > > >>> > > and pw<br>
> > > > >> > > > >>> > > > >> is provided, and your AD is happy to hand over<br>
> info<br>
> > > to<br>
> > > > >> > > anyone<br>
> > > > >> > > > >>> who asks<br>
> > > > >> > > > >>> > > for<br>
> > > > >> > > > >>> > > > >> it. If this is the case, you will _not_ see<br>
> > > > >> authentication<br>
> > > > >> > > > >>> > > information. The<br>
> > > > >> > > > >>> > > > >> following MS KB article should probably help<br>
> you<br>
> > > > >> determine<br>
> > > > >> > > on<br>
> > > > >> > > > >>> 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<br>
> going,<br>
> > > but<br>
> > > > >> you<br>
> > > > >> > > can<br>
> > > > >> > > > >>> follow<br>
> > > > >> > > > >>> > > > >> along with it to check your current settings<br>
> > > without<br>
> > > > >> making<br>
> > > > >> > > any<br>
> > > > >> > > > >>> > > changes.<br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > > I checked our setting. Permission type for<br>
> normal<br>
> > > user is<br>
> > > > >> > > "Read &<br>
> > > > >> > > > >>> > > Execute".<br>
> > > > >> > > > >>> > > > > I click edit to check the detail about<br>
> permission. I<br>
> > > > >> think it<br>
> > > > >> > > > >>> only<br>
> > > > >> > > > >>> > > allow the<br>
> > > > >> > > > >>> > > > > user to read the attributes, permission<br>
> something<br>
> > > and<br>
> > > > >> can't<br>
> > > > >> > > > >>> modify the<br>
> > > > >> > > > >>> > > > > AD.There is "Everyone" setting is also set as<br>
> "Read<br>
> > > &<br>
> > > > >> > > Execute".<br>
> > > > >> > > > >>> By the<br>
> > > > >> > > > >>> > > way,<br>
> > > > >> > > > >>> > > > > the AD is Win2003 R2.<br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > ><br>
> > > > >> > > > >>> > > > >><br>
> > > > >> > > > >>> > > > >> 2. Authentication is happening. It will be the<br>
> > > _very_<br>
> > > > >> first<br>
> > > > >> > > > >>> thing the<br>
> > > > >> > > > >>> > > > >> client and server perform, after basic<br>
> connection<br>
> > > > >> > > establishment.<br>
> > > > >> > > > >>> 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<br>
> > > article is<br>
> > > > >> > > > >>> extremely<br>
> > > > >> > > > >>> > > > >> informative about all the different ways you<br>
> can<br>
> > > plug<br>
> > > > >> linux<br>
> > > > >> > > into<br>
> > > > >> > > > >>> 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<br>
> have<br>
> > > any<br>
> > > > >> idea,<br>
> > > > >> > > let<br>
> > > > >> > > > >>> 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>
> > > > >> > > > >>> > ><br>
> > > > >> > > > >>><br>
> > > > >> > ><br>
> > > > >><br>
> > ><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">tac_plus@shrubbery.net</a><br>
> > > > >> > > > >>> > > ><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>
> > > > >> > > > >>><br>
> > > > >> > > > >><br>
> > > > >> > > > >><br>
> > > > >> > > > ><br>
> > > > >> > ><br>
> > > > >> > -------------- next part --------------<br>
> > > > >> > An HTML attachment was scrubbed...<br>
> > > > >> > URL:<br>
> > > > >><br>
> > ><br>
> <a href="http://www.shrubbery.net/pipermail/tac_plus/attachments/20091123/4e65d4d2/attachment.html" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/attachments/20091123/4e65d4d2/attachment.html</a><br>
> > > > >> > _______________________________________________<br>
> > > > >> > tac_plus mailing list<br>
> > > > >> > <a href="mailto:tac_plus@shrubbery.net">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>
> > > > >><br>
> > > > >><br>
> > ><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
</div></div>URL: <a href="http://www.shrubbery.net/pipermail/tac_plus/attachments/20091124/a877fda6/attachment.html" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/attachments/20091124/a877fda6/attachment.html</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
tac_plus mailing list<br>
<a href="mailto:tac_plus@shrubbery.net">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>
</div></div></blockquote></div><br>