新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

如何在linux服务器上实现tacacs认证

  要想在Linux实现终端访问,你绕不开的是tacacs和radius认证,如何实现tacacs认证呢?其实并不难,今天小编就给大家带来教程。
  Linux服务器实现tacacs认证,通过PAM(可插拔的认证模块)实现。PAM的接口文件位于/etc/pam.d文件夹下,模块位于/lib/security文件夹中(有些服务器位于lib64/security/)。

公司主营业务:成都网站建设、成都网站设计、移动网站开发等业务。帮助企业客户真正实现互联网宣传,提高企业的竞争能力。创新互联是一支青春激扬、勤奋敬业、活力青春激扬、勤奋敬业、活力澎湃、和谐高效的团队。公司秉承以“开放、自由、严谨、自律”为核心的企业文化,感谢他们对我们的高要求,感谢他们从不同领域给我们带来的挑战,让我们激情的团队有机会用头脑与智慧不断的给客户带来惊喜。创新互联推出阿城免费做网站回馈大家。

  默认PAM安装包中不包括tacacs认证模块,需要下载源代码进行编译,具体步骤如下(已Centos为例):
  1、确认linux服务器中gcc(c编译器)、autoreconf(shell脚本工具)、yum(安装程序工具)是否安装。
  例:rpm -qa |grep yum查看yum是否安装,/etc/yum.repos.d/CentOS-Base.repo中有yum默认程序源配置,一般都是http://mirrors.163.com/centos/6/os/$basearch/。
  autoreconf需要安装automake和libtool,autoreconf、libtool在163镜像中没有,rpm文件见附件。安装命令为:rpm -Uvh 程序名
  2、将pam_tacplus-1.3.9.tar.gz拷贝到服务器中,位置自选。tar zxvf pam_tacplus-1.3.9.tar.gz解压文件。
  3、编译安装pam tacacs模块。
  $ autoreconf -i
  $ ./configure && make && sudo make install
  4、模块默认安装在/usr/local/lib/security,若要修改位置需要再研究。将生成的pam_tacplus.so拷贝到/lib64/security下的
  Libraries have been installed in:
  /usr/local/lib/security
  If you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, and
  specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:
  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
  during execution
  - add LIBDIR to the `LD_RUN_PATH' environment variable
  during linking
  - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
  - have your system administrator add LIBDIR to `/etc/ld.so.conf'
  5、修改/etc/pam.d/sshd文件,在auth类型中增加以下内容
  tacacs down local配置
  auth       [success=done new_authtok_reqd=done ignore=ignore default=die]   pam_tacplus.so debug server=**.**.**0.199 secret=194.120/32
  tacacslocal配置
  auth       sufficient   pam_tacplus.so debug server=*.*.*.* secret=*****
  注:tacacs认证也需在本地创建帐户,可不设密码。
  相较于保密性相对较差的radius,tacacs无疑被更多的应用于企业所用的服务器当中。而且还能支持多协议,所以,这一块的内容可是不得不学的哦、


网站标题:如何在linux服务器上实现tacacs认证
网页网址:http://www.wjwzjz.com/article/cihghh.html
在线咨询
服务热线
服务热线:028-86922220
TOP