It makes sense. nsswitch.conf should be for like local login not for tacacs. Thanks John to point it out. I'm such a rookie to these things. Just followed some guides and combine them here. Need study more.<br><br>Lou<br>
<br><div class="gmail_quote">On Tue, Nov 24, 2009 at 10:24 AM, john heasley <span dir="ltr"><<a href="mailto:heas@shrubbery.net">heas@shrubbery.net</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;">
Tue, Nov 24, 2009 at 11:11:57AM +0100, Jeroen Nijhof:<br>
<div class="im">><br>
> Hi Lou,<br>
><br>
> Yes, most server application's check if a user exist by looking up 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 retrieving from<br>
> >AD? I do see the packets from AD server told my tacacs+ server the user<br>
> >attributes including homedir.<br>
<br>
</div>i would not expect this to affect tacacs, unless you have something in your<br>
pam config that requires it. ie: nsswitch.conf should control auth for the<br>
host (eg: /sbin/login), tacacs is separate.<br>
<div><div></div><div class="h5"><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>> 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 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 password.<br>
> >> > Feel confused since ldap is able to get user info from Active 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 no 3,<br>
> >> flags<br>
> >> > 0x1<br>
> >> > Mon Nov 23 15:21:16 2009 [3806]: session_id 3197597252 (0xbe977644), 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), user_data_len 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 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 no 4,<br>
> >> flags<br>
> >> > 0x1<br>
> >> > Mon Nov 23 15:21:16 2009 [3806]: session_id 3197597252 (0xbe977644), 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 (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 no 5,<br>
> >> flags<br>
> >> > 0x1<br>
> >> > Mon Nov 23 15:21:21 2009 [3806]: session_id 3197597252 (0xbe977644), 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), 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' tty0 from<br>
> >> > 10.1.69.89 rejected<br>
> >> > Mon Nov 23 15:21:22 2009 [3806]: login failure: 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 no 6,<br>
> >> flags<br>
> >> > 0x1<br>
> >> > Mon Nov 23 15:21:22 2009 [3806]: session_id 3197597252 (0xbe977644), 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 (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 <<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 to get<br>
> >> pam<br>
> >> > > work<br>
> >> > > > against active directory. Is this true? The post I was 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] slightly<br>
> >> > > different. seems silly to need kerberos for ldap.<br>
> >> > ><br>
> >> > > > On Mon, Nov 23, 2009 at 2:49 PM, Hailu Meng <<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>
> >> <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 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>
> >> > > > > account sufficient pam_succeed_if.so uid < 500 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 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 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 <<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 /etct/tac_plus.conf -L -p<br>
> >> 49<br>
> >> > > -d<br>
> >> > > > >> 16 -d 256 -g ? -d 16 -d 256 side by side? It didn't make 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 Initialized<br>
> >> 1<br>
> >> > > > >> Nov 23 14:24:29 NMS tac_plus[3676]: connect from 10.1.69.89<br>
> >> > > [10.1.69.89]<br>
> >> > > > >> Nov 23 14:24:37 NMS tac_plus[3676]: login query for 'myuser' 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 found where<br>
> >> it<br>
> >> > > is.<br>
> >> > > > >> if we can check the log of PAM, then we could find something<br>
> >> useful.<br>
> >> > > Right<br>
> >> > > > >> now the log of tac_plus didn't tell too much about why login 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 <<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 -d256 -g<br>
> >> to<br>
> >> > > see<br>
> >> > > > >>> the<br>
> >> > > > >>><br>
> >> > > > >>> try -d 16 -d 256. which i think will log the pwd that pam<br>
> >> received<br>
> >> > > from<br>
> >> > > > >>> the device. make its correct. the logs below do appear to be a<br>
> >> > > > >>> reject/fail<br>
> >> > > > >>> returned from pam.<br>
> >> > > > >>><br>
> >> > > > >>> > log in stdout and in log file. I can't see any suspicious 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 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,<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 default_fn<br>
> >> > > > >>> > Sat Nov 21 22:28:27 2009 [3393]: Calling authentication<br>
> >> 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,<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, 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>
> >> > > > >>> > Sat Nov 21 22:28:34 2009 [3393]: PACKET: key=mykey<br>
> >> > > > >>><br>
> >> > > > >>> > Sat Nov 21 22:28:34 2009 [3393]: version 192 (0xc0), type 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 (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 'myusername'<br>
> >> tty0<br>
> >> > > from<br>
> >> > > > >>> > 10.1.69.89 r<br>
> >> > > > >>> > ejected<br>
> >> > > > >>> > Sat Nov 21 22:28:36 2009 [3393]: login failure: 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 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,<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>: 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, what do we<br>
> >> > > suppose<br>
> >> > > > >>> to<br>
> >> > > > >>> > > get<br>
> >> > > > >>> > > > from the output? I just got all of the user information in<br>
> >> that<br>
> >> > > > >>> group.<br>
> >> > > > >>> > > Does<br>
> >> > > > >>> > > > that means my password and username got authenticated<br>
> >> > > successfully<br>
> >> > > > >>> > > against<br>
> >> > > > >>> > > > AD?<br>
> >> > > > >>> > > ><br>
> >> > > > >>> > > > This thing drives me crazy. I need solve it through this<br>
> >> week<br>
> >> > > > >>> before the<br>
> >> > > > >>> > > > holiday...<br>
> >> > > > >>> > ><br>
> >> > > > >>> > > i havent followed this thread, as i know nearly zero about<br>
> >> ldap.<br>
> >> > > > >>> but,<br>
> >> > > > >>> > > have you enabled authentication debugging in the tacacas<br>
> >> daemon<br>
> >> > > and<br>
> >> > > > >>> > > checked the logs to determine what is coming back from pam?<br>
> >> it<br>
> >> > > very<br>
> >> > > > >>> > > well may be that the ldap client is working just fine, but<br>
> >> there<br>
> >> > > is a<br>
> >> > > > >>> > > pam module bug or a bug in the tacplus daemon or that 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 seems 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 but I<br>
> >> don't<br>
> >> > > have<br>
> >> > > > >>> that<br>
> >> > > > >>> > > > >>> userid in CentOS. So the CentOS just don't want me log<br>
> >> in.<br>
> >> > > I<br>
> >> > > > >>> 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,<br>
> >> > > that's<br>
> >> > > > >>> the<br>
> >> > > > >>> > > point<br>
> >> > > > >>> > > > >> of using ldap for authentication. The user is defined in<br>
> >> > > ldap,<br>
> >> > > > >>> not in<br>
> >> > > > >>> > > > >> CentOS. Now that I think about it, su - <user> probably<br>
> >> > > wouldn't<br>
> >> > > > >>> work<br>
> >> > > > >>> > > > >> anyway, as AD doesn't by default have the data 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 authentication<br>
> >> against<br>
> >> > > AD<br>
> >> > > > >>> with<br>
> >> > > > >>> > > the<br>
> >> > > > >>> > > > >>> userid in AD? I tried ldapsearch. It did find my user<br>
> >> id<br>
> >> > > > >>> without<br>
> >> > > > >>> > > problem.<br>
> >> > > > >>> > > > >>> But I haven't found any option to try with 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 the LDAP<br>
> >> > > > >>> directory.<br>
> >> > > > >>> > > > >><br>
> >> > > > >>> > > > >> so -D cn=username,ou=my_ou,dc=my_dc should let you try<br>
> >> to<br>
> >> > > > >>> authenticate<br>
> >> > > > >>> > > > >> using whatever user you want to define. Just check 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 " but it just<br>
> >> > > > >>> returned lots<br>
> >> > > > >>> > > of<br>
> >> > > > >>> > > > > users' information. It means successful?<br>
> >> > > > >>> > > > ><br>
> >> > > > >>> > > > ><br>
> >> > > > >>> > > > >> Do you have ldap server setup or only the openldap<br>
> >> library<br>
> >> > > and<br>
> >> > > > >>> > > openldap<br>
> >> > > > >>> > > > >>> client? I don't understand why the log is not turned<br>
> >> on.<br>
> >> > > There<br>
> >> > > > >>> must<br>
> >> > > > >>> > > be some<br>
> >> > > > >>> > > > >>> debugging info in the log which can help solve this<br>
> >> issue.<br>
> >> > > > >>> > > > >>><br>
> >> > > > >>> > > > >><br>
> >> > > > >>> > > > >> only the libs and client. You should not need the<br>
> >> server. In<br>
> >> > > the<br>
> >> > > > >>> > > > >> ldapsearch, you can use -d <integer> to get 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 capture<br>
> >> some<br>
> >> > > > >>> packets<br>
> >> > > > >>> > > about<br>
> >> > > > >>> > > > >>> password verification? Right now I only see the 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 the<br>
> >> client<br>
> >> > > and<br>
> >> > > > >>> server.<br>
> >> > > > >>> > > If<br>
> >> > > > >>> > > > >> you can search out the user in your AD right now, then<br>
> >> one<br>
> >> > > of<br>
> >> > > > >>> two<br>
> >> > > > >>> > > things is<br>
> >> > > > >>> > > > >> happening:<br>
> >> > > > >>> > > > >><br>
> >> > > > >>> > > > >> 1. You are performing anonymous searches. In this case,<br>
> >> no<br>
> >> > > > >>> username<br>
> >> > > > >>> > > and pw<br>
> >> > > > >>> > > > >> is provided, and your AD is happy to hand over info 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 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 going, but<br>
> >> you<br>
> >> > > can<br>
> >> > > > >>> follow<br>
> >> > > > >>> > > > >> along with it to check your current settings without<br>
> >> making<br>
> >> > > any<br>
> >> > > > >>> > > changes.<br>
> >> > > > >>> > > > >><br>
> >> > > > >>> > > > ><br>
> >> > > > >>> > > > > I checked our setting. Permission type for normal user is<br>
> >> > > "Read &<br>
> >> > > > >>> > > Execute".<br>
> >> > > > >>> > > > > I click edit to check the detail about permission. I<br>
> >> think it<br>
> >> > > > >>> only<br>
> >> > > > >>> > > allow the<br>
> >> > > > >>> > > > > user to read the attributes, permission something and<br>
> >> can't<br>
> >> > > > >>> modify the<br>
> >> > > > >>> > > > > AD.There is "Everyone" setting is also set as "Read &<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 _very_<br>
> >> first<br>
> >> > > > >>> thing the<br>
> >> > > > >>> > > > >> client and server perform, after basic 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 article is<br>
> >> > > > >>> extremely<br>
> >> > > > >>> > > > >> informative about all the different ways you can 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 have 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>
> >> <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>
> >> > > > >>> > > > <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>
> >> <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>
</div></div></blockquote></div><br>