This document is intended to assist the first-time TACACS+ user in setting
up and debugging a TACACS+ configuration. It is not an exhaustive description
of TAC+ capabilities.
tac_plus_executable -P -C test_fileYou may see the contents of test_file scroll down the screen, but you should not see messages such as "cannot find file", "cleartext expected--found cleartext", or "unexpected }". If there are errors, check paths to test_file, re-check your typing, and re-test before continuing.
Enter enable mode and type conf t before
the command set.
The following syntax will ensure that you will not be locked out
of the router initially, providing the tac_plus_executable is not
running:
! Turn on Tac+ aaa new-model enable password whatever ! These are lists of authentication methods, ! i.e. 'linmethod', 'vtymethod', 'conmethod' are ! names of lists, and the methods listed on the same lines are ! the methods in the order to be tried. As used here, if authentication ! fails due to the tac_plus_executable not being started, the enable ! password will be accepted because it is in each list aaa authentication login linmethod tacacs+ enable aaa authentication login vtymethod tacacs+ enable aaa authentication login conmethod tacacs+ enable ! Point the router to the server, i.e. #.#.#.# is server ip address tacacs-server host #.#.#.# line con 0 <dir>password whatever ! no time-out to prevent being locked out during debugging exec-timeout 0 0 login authentication conmethod</dir> line 1 8 <dir>login authentication linmethod modem InOut transport input all rxspeed 38400 txspeed 38400 flowcontrol hardware </dir> line vty 0 4 <dir>password whatever ! no time-out to prevent being locked out during debugging exec-timeout 0 0 login authentication vtymethod</dir>
NOTE: Keep the console
port session active and remain in enable mode; this session should
not time out. We are starting to limit access to the router at this point,
and you need to be able to make configuration changes without locking yourself
out.
To see server-to-router interaction at the router:
term mon debug aaa authentication
tac_plus_executable -C test_file -d 16
ps -aux | grep tac_plus_executableOr,
ps -ef | grep tac_plus_executableIf TAC+ does not start, it is usually a problem with syntax in the test_file. Return to Step 1 to correct.
tail -f /var/tmp/tac_plus.logNOTE: The -d 16 option in Step 5 sends output of all transactions to the /var/tmp/tac_plus.log.
With debug going on the router and the server (steps 4 and 7), telnet
into the router from another part of the network.
The router should produce a username and password prompt, to which you reply:
'authenuser' (username from test_file)
'admin' (password from test_file)
where user 'authenuser' is in group 'admin', which has password 'admin'.
Watch the server and the router where you should see the TAC+
interaction–what's being sent where, responses, requests, etc. Correct
any problems before continuing.
! For enable mode, list 'default' looks to TAC+ then enable password if TAC+ not running aaa authentication enable default tacacs+ enableUsers should now have to enable through TAC+.
'authenuser' (username from test_file)
'admin' (password from test_file)
When entering enable mode, the router will request a password, to which you reply:
'cisco' ($enable$ password from test_file)
Watch the server and the router where you should see the TAC+
interaction – what's being sent where, responses, requests, etc. Correct
any problems before continuing.
ps -aux | grep tac_plus_executableOr,
ps -ef | grep tac_plus_executable) kill -9 pid_of_tac_plus_executableRepeat the Telnet and enable of the previous step. The router should realize that the TAC+ process is not responding and allow users to log in and enable with the default passwords.
Remain connected via telnet into the router in enable mode
until you are sure you can log in to the router through the console port.
Log out of your original connection to the router through the
console port, then reconnect to the console port. Console port authentication
to log in and enable using userIDs and passwords (shown in step 10) should
now be through TAC+.
Line users should now have to log in and enable through TAC+.
The router should produce a username and password prompt, to which you reply:
'authenuser' (username from test_file)
'admin' (password from test_file)
When entering enable mode, the router will request a password.
Reply:
'cisco' ($enable$ password from test_file)
Watch the server and the router where you should see the TAC+
interaction – what's being sent where, responses, requests, etc. Correct
any problems before continuing.
aaa authorization commands 0 tacacs+ none aaa authorization commands 1 tacacs+ none aaa authorization commands 15 tacacs+ none
While in the router, enter enable mode, and turn on authorization
debugging:
term mon debug aaa authorization
This user should be able to do two show commands: traceroute
and logout (see test_file).
Watch the server and the router where you should see the TAC+
interaction, i.e., what's being sent where, responses, requests, etc. Correct
any problems before continuing.
Stop and start the TAC+ server.
On the router:
aaa authorization exec tacacs+Telnet to the router with userid transient and password transient. The telnet #.#.#.# will execute and user transient will be sent to the other location.
aaa accounting exec start-stop tacacs+ aaa accounting connection start-stop tacacs+ aaa accounting network start-stop tacacs+ aaa accounting system start-stop tacacs+NOTE: AAA accounting doesnt do per-command accounting in some versions. A workaround is to use per-command authorization and log the occurrence in the accounting file. (See Bug ID CSCdi44140.) If you are using an image in which this is fixed is being used [11.2(1.3)F, 11.2(1.2), 11.1(6.3), 11.1(6.3)AA01, 11.1(6.3)CA as of September 24, 1997] you can also enable command-accounting.
tail -f /var/log/tac.logThen log into and out of the router, telnet out of the router, etc.
If necessary, on the router enter:
term mon debug aaa accounting
- - - - - - - - - - - - - - - - - - - - - - (cut here) - - - - - - - - - - - - - - - - - - - - - - -
# Set up accounting file if enabling accounting on NAS
accounting file = /var/log/tac.log
# Enable password setup for everyone:
user = $enable$ {
login = cleartext "cisco"
}
# Group listings must be first:
- - - - - - - - - - - - - - - - - - - - - - (end cut here) - -
- - - - - - - - - - - - - - - - - - - - -
Copyright 1997 Cisco Systems, Inc.