Ubuntu下安装tacacs+服务器

  1. 下载tacacs+服务器地址ftp://ftp.shrubbery.net/pub/tac_plus/tacacs±F4.0.4.26.tar.gz
  2. 把压缩包拷至自己定义的文件夹中解压,# tar zxvf tacacs±F4.0.4.26.tar.gz
  3. 进入解压后的文件夹中,# cd tacacs±F4.0.4.26
  4. 依次输入# less INSTALL
  5. ./configure 可能会提示安装libwrap

configure: error: Could not find libwrap. You must first install tcp_wrappers.
看到这个提示安装libwrap0-dev # apt-get install libwrap0-dev
centos系统请安装tcp_wrappers, tcp_wrappers-devel
6. 然后# make&make install
7. 安装完成后可以在/usr/local/bin路径下看到tac_plus和tac_pwd两条指令,可以通过
#man tac_plus
#man tac_pwd
查看指令对应的功能

  1. 在/etc路径下新建一个文件夹tacacs, # mkdir tacacs
    并在该文件夹下新建一个conf文件,# touch tac_plus.conf

  2. 在tac_plus.conf里面加入需要tacacs+服务器认证的 user、group、service

    设置key

       #tacacs key
       key = "tackey"
    

    设置user 账户

     #user details
    #admin [email protected]
     user = freelinux {
     default service = permit
     member = admingroup
     login = des VUjB99kC2IGws
     }
    

其中 login 中的des是加密后的密码,通过tac_pwd命令生成
root@freelinux:/etc/tacacs# /usr/local/bin/tac_pwd
Password to be encrypted: password
VUjB99kC2IGws

设置group

 #group details
 #admin group
 group = admingroup {
default service = permit
service = exec {
priv-lvl = 15
}
}

设置日志存储

accounting file = /var/log/tacacs/tac_plus.log
  1. 每次修改tac_plus.conf文件后,需要重启tacacs服务。
  2. 启动tacacs+服务器
    #chmod 600 /etc/tacacs/tac_plus.conf
    #/etc/init.d/tac_plus start
    有的路径里是tacacs_plus
    #tac_plus -C tac_plus.conf
  3. 确认已开启服务
    #ps -aux | grep tac
    root 11444 0.0 0.0 15532 1508 pts/1 S 11:42 0:00 tac_plus -C tac_plus.conf
    root 11446 0.0 0.1 15956 2520 pts/1 S+ 11:42 0:00 grep --color=auto tac
    #netstat -na | grep 49
    tcp 0 0 0.0.0.0:49 0.0.0.0:* LISTEN

参考链接:http://freelinuxtutorials.com/tutorials/installation-setup-of-free-tacacs-server-in-linux/

猜你喜欢

转载自blog.csdn.net/ly_6118/article/details/83414197