Configuring Tacacs Plus with Linux Systems Users Authentication on RHEL/CentOS 7

1. Overview


Tacacs Plus is an identity management solutions with a protocol for AAA services such as , authentication, authorization, accounting. It is used as a centralized authentication and identity access management to network devices. It is the protocols for security that can provide a specific authorization and centralized access to particular user to work with network devices.

With accounting, it gives a mandatory audit logs or event log monitoring by logging all actions executed by privileged users.

2. Prerequisites


In this article of how to install Tacac+ identity and access management solutions, it is presumed that:

a. You have already install RHEL/CentOS 7 Linux dedicated server up and running. In case that you don’t, you would probably like to read this link. Minimal RHEL/CentOS 7 Installation With Logical Volume Manager (LVM).
b. You have already done the initial server setup. Please refer to this link Minimal RHEL/CentOS 7 Initial Server Setup.

3. Installing Tacacs Plus


First of all we need to create a new Yum repository file where we can grab tac_plus, Tacac+ identity management solutions, packet, so we don’t need to compiling the source code.

# cd /etc/yum.repos.d/
# vim tacacs-plus.repo

name=Tacacs Plus

Now we can start to install tac_plus packet by using the following command.

# yum –enablerepo=tacacs-plus install tac_plus

4. Configuring Tacacs Plus


Below is the configuration requirement. There are two groups. The first group name is “netadmins” with full privilege on the network devices and the second group name is “guestusers” who can have a centralized access to execute command show view the configuration but not be able to make any change on the network devices.

Authentication Authorization Commands Accounting
Group Name Group Member
netadmins tom Full privileges /var/log/tac.acct
guestusers noc show


Before starting to edit Tacac+ identity management solutions configuration file to meet above requirement, let create the users in Linux systems and set a password for them first.

# useradd tom
# passwd tom

# useradd jerry
# passwd jerry

# useradd noc
# passwd noc

We can start editing Tacacs Plus identity management solutions configuration file as the following.

# vim /etc/tac_plus.conf

key = “VK@123”
accounting file = /var/log/tac.acct
## Groups Definition ##
group = netadmins {

default service = permit
login = PAM
service = exec {
priv-lvl = 15

group = guestusers {

default service = deny
login = PAM

service = exec {
priv-lvl = 15
cmd = show {
permit .*
cmd = exit {
permit .*
cmd = quit {
permit .*
cmd = end {
permit .*

## Users Definition ##

user = tom {
member = netadmins
user = jerry {
member = netadmins

user = noc {
member = guestusers

Finally, we need to start service of Tacacs+ identity management solutions which is tac_plus service and enable it to start after systems reboot.

# system restart tac_plus
# chkconfig tac_plus on

We can view tac_plus port with the following command.

# nmap localhost

Starting Nmap 6.40 ( ) at 2017-05-25 22:19 +07
Nmap scan report for localhost (
Host is up (0.0000080s latency).
Other addresses for localhost (not scanned):
Not shown: 997 closed ports
22/tcp open ssh
49/tcp open tacacs

Nmap done: 1 IP address (1 host up) scanned in 0.10 second

Now we need to open the firewall for tac_plus port.

# vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state –state NEW -m tcp –dport 49 -j ACCEPT

# systemctl restart iptables
# iptables -L -v -n

5. Conclusion


This is how to configure Tacacs+  identity management solutions on RHEL/CentOS 7. Tacacs+ is the only security protocols used to provide centralized access into networks.Hopefully, you can understand and be able to install and configure for authenticating with Linux systems users now. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them. Thank you and have a great day.