Yes you can do that, here is a template for the command structure. I threw in a few extra things for you to concider (banners for specific things etc.) But this will allow the NAS to look-up TACACS or RADIUS if the loggin fails then it will look for the local accounts you built on the NAS. I seperated commands for things with brackets like this [Purpose]. I hope this helps you! The one you want to pay attention to is the [Set AAA Services] under that is where I point the login to go to a radius server if it fails it goes to local login, and you would still have to use secret to get to exec mode. Note you still need to create a local username and password for this to work I show that first. If you need more specific info just email me at tschouten at weltman.com
Router(config)# enable secret XYZ123(if not already performed)
Router(config)# username Sysadmin privilege 15 password xyz123
Router(config)# service password-encryption (if not already performed)
Router(config)# aaa new-model
[SET BANNERS]
Router(config)# aaa authentication banner @
*** Unauthorized Access Prohibited!! ***
---------------------WARNING--------------------
You have reached a private network. All access is
monitored and logged. Any unauthorized access will
be prosecuted under all local, state and federal
laws.
---------------------WARNING--------------------
*** Unauthorized Access Prohibited!! *** @
Router(config)# aaa authentication fail-message @
*** Login Attempt Failed *** @
[SET AAA SERVICES]
Router(config)# aaa authentication login default radius local-case enable
Router(config)# aaa authorization exec radius if-authent local
Router(config)#aaa accounting update periodic 5
Router(config)# aaa accounting ?
commands For exec (shell) commands.
connection For outbound connections. (telnet, rlogin)
exec For starting an exec (shell).
nested When starting PPP from EXEC, generate
NETWORK records before EXEC-STOP record.
network For network services. (PPP, SLIP, ARAP)
send Send records to accounting server.
suppress Do not generate accounting records for a
specific type of user.
system For System events.
update Enable accounting update records.
(whatever you want logged into the accounting)
[SET SERVER ADDRESS]
Router(config)# radius-server {ip address of server}
Router(config)# radius-server challenge-noecho
[Set Login on Lines ie. telnet, Modem, etc. Suggest using show line command to find out how many lines you have for everything.]
Router(config)# line 0 6
Router(config-line)# login authent default
Router(config-line)# exit
Router(config)# line vty 0 4
Router(config-line)# login authent default
Router(config-line)# exit
Router(config)# line con 0
Router(config-line)# login authent default
Router(config-line)# exit
Router(config)# line aux 0
Router(config-line)# login authent default
Router(config-line)# exit