Book now with code EOY2025
aaa new-model ! ! aaa authentication login MYTEST local none ! ! username user password 0 cisco ! line vty 0 4 login authentication MYTEST line vty 5 15 login authentication MYTEST ! ! R1#debug aaa authen AAA Authentication debugging is on R1#debug aaa pro local AAA Local debugs debugging is on R1# *Mar 1 00:11:06.847: AAA/LOCAL: exec *Mar 1 00:11:06.855: AAA/BIND(00000005): Bind i/f *Mar 1 00:11:06.863: AAA/LOCAL: new_ascii_login: tty 64CC1D34 idb 0 *Mar 1 00:11:06.867: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:06.879: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:09.619: AAA/LOCAL/LOGIN(00000005): get password R1# *Mar 1 00:11:12.751: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:12.751: AAA/LOCAL/LOGIN(00000005): invalid username/password R1# *Mar 1 00:11:14.763: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:14.771: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:20.779: AAA/LOCAL/LOGIN(00000005): get password *Mar 1 00:11:21.771: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:21.771: AAA/LOCAL/LOGIN(00000005): invalid username/password R1# *Mar 1 00:11:23.783: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:23.791: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:28.139: AAA/LOCAL/LOGIN(00000005): get password *Mar 1 00:11:28.943: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:28.947: AAA/LOCAL/LOGIN(00000005): invalid username/password R2#telnet 10.0.0.1 Trying 10.0.0.1 ... Open User Access Verification Username: user Password: % Authentication failed Username: user Password: % Authentication failed Username: user Password: % Authentication failed [Connection to 10.0.0.1 closed by foreign host] R2#
networker050184 wrote: That's odd. I just labed it up myself and just as I though it doesn't allow me to get through using your exact config after failed attempts. Are you sure you do not have anything extra on there?aaa new-model ! ! aaa authentication login MYTEST local none ! ! username user password 0 cisco ! line vty 0 4 login authentication MYTEST line vty 5 15 login authentication MYTEST ! ! R1#debug aaa authen AAA Authentication debugging is on R1#debug aaa pro local AAA Local debugs debugging is on R1# *Mar 1 00:11:06.847: AAA/LOCAL: exec *Mar 1 00:11:06.855: AAA/BIND(00000005): Bind i/f *Mar 1 00:11:06.863: AAA/LOCAL: new_ascii_login: tty 64CC1D34 idb 0 *Mar 1 00:11:06.867: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:06.879: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:09.619: AAA/LOCAL/LOGIN(00000005): get password R1# *Mar 1 00:11:12.751: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:12.751: AAA/LOCAL/LOGIN(00000005): invalid username/password R1# *Mar 1 00:11:14.763: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:14.771: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:20.779: AAA/LOCAL/LOGIN(00000005): get password *Mar 1 00:11:21.771: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:21.771: AAA/LOCAL/LOGIN(00000005): invalid username/password R1# *Mar 1 00:11:23.783: AAA/AUTHEN/LOGIN (00000005): Pick method list 'MYTEST' *Mar 1 00:11:23.791: AAA/LOCAL/LOGIN(00000005): get user R1# *Mar 1 00:11:28.139: AAA/LOCAL/LOGIN(00000005): get password *Mar 1 00:11:28.943: AAA/LOCAL/LOGIN(00000005): check username/password *Mar 1 00:11:28.947: AAA/LOCAL/LOGIN(00000005): invalid username/password R2#telnet 10.0.0.1 Trying 10.0.0.1 ... Open User Access Verification Username: user Password: % Authentication failed Username: user Password: % Authentication failed Username: user Password: % Authentication failed [Connection to 10.0.0.1 closed by foreign host] R2#
aaa new-model ! ! aaa authentication login MYTEST local none ! line vty 0 4 login authentication MYTEST
Cisco wrote: The list-name is a character string used to name the list you are creating. The method argument refers to the actual method the authentication algorithm tries. The additional methods of authentication are used only if the previous method returns an error, not if it fails. To specify that the authentication should succeed even if all methods return an error, specify none as the final method in the command line.
networker050184 wrote: » Hmmm it let me in when I used a user name that is not defined. Not sure why that is though.... I guess the bad user name is considered an error and not a "fail".
fonque wrote: » networker050184 - in your config you have the line username user password 0 cisco
fonque wrote: » did this happen with or without a username/password configured on the switch? networker050184 - in your config you have the line username user password 0 cisco kpjungle - do you have any usernames configured for your local database? my assumption would be that you do not, hence the fail instead of a invalid
kpjungle wrote: » Hi, I am doing some tests with aaa, and I found a gotcha I cant quite explain. If i configure aaa in the following way for logins: aaa authentication login MYTEST local none What i expect to happen is that the user will be authenticated with the local user database, and only in case of error querying this or timeout will the none option be used. However, the result i see when applying this list to a vty line (login authentication MYTEST), is that if i enter in an incorrect username, it will allow me into the router... Not what I had expected. Debug aaa authentication doesnt give any reason as to why this action was taken. Anyone able to clarify this?
PStefanov wrote: » This is exactly what you would expect. Remember that when you specify multiple methods in a aaa command, and when the first method is unavailable, then and only then a second method might be used if configured. That is, if the first method returns an "authentication failed" (for example, you've typed in wrong username or password), then the second method is NOT consulted. Only if the router fails to communicate via the first method (for instance, is not able to communicate with a RADIUS server), then the second method is consulted. Fallback does not happen for failed authentication. HTH, Pavel
Use code EOY2025 to receive $250 off your 2025 certification boot camp!