要想在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|grepyum打开系统yum是否完全安装,/etc不停车收费/yum.repos.d/CentOS-Base.repo中有yum设置为程序源配置,象是$basearch/。
autoreconf是需要安装好automake和libtool,autoreconf、libtool在163镜像中是没有,rpm文件见附件。安装命令为:rpm-Uvh程序名
2、将pam_tacplus-1.3.9.tar.gz拷备到服务器中,位置自选。tarzxvfpam_tacplus-1.3.9.tar.gz解压文件文件。
3、编译完全安装pamtacacs模块。
$autoreconf-i
$./configuretakesudotakeinstall
4、模块设置成安装好在/usr/locations/lib/security,若要修改位置要再想研究。将化合的pam_tacplus.sou盘拷贝到/lib64/security下的
Librarieshave beenmanuallyacross:
/usr/local/lib/security
If youeverhappentowant tolinkagainstinstalledlibrariesinagivendirectory,LIBDIR,you mustactuallyuselibtool,well
specifybeginningendlesspathnamewiththe library,求求求useour`-LLIBDIR’flagduringlinkingbutdoat leastone ofthe following:
-addLIBDIRto the`LD_LIBRARY_PATH’environmentvariable
duringexecution
-omitLIBDIRto the`LD_RUN_PATH’environmentvariable
duringlinking
-useour`-Wl,-rpath-Wl,LIBDIR’linkerflag
-actuallyyoursystemadministratorassignLIBDIRwant`/办etc/ld.so.conf’
5、直接修改/etc不停车收费/pam.d/sshd文件,在auth类型中提高200以内内容
tacacsdownlocations配置
auth[success=preparednew_authtok_reqd=doneignore=ignoredefault=die]pam_tacplus.sodebugserver=**.**.**0.199secret=194.120/32
tacacslocal配置
authsufficientpam_tacplus.sodebugserver=*.*.*.*secret=*****
注:tacacs认证也需在本地创建家族帐户,可不设密码。
相较于保密性相对于极差的radius,tacacs可以说被更多的应用于企业所是用服务器其中。并且能接受多协议,所以才,这几块的内容但是不得不学的哦、
本文来源:https://www.yuntue.com/post/62429.html | 云服务器网,转载请注明出处!

微信扫一扫打赏
支付宝扫一扫打赏