<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>x83.net &#187; tac_plus</title>
	<atom:link href="http://www.x83.net/tag/tac_plus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Sat, 24 Jul 2010 09:50:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Juniper Tacacs &amp; Rancid</title>
		<link>http://www.x83.net/juniper-tacacs-rancid/</link>
		<comments>http://www.x83.net/juniper-tacacs-rancid/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 06:36:03 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Juniper]]></category>
		<category><![CDATA[authentication-order]]></category>
		<category><![CDATA[rancid]]></category>
		<category><![CDATA[tacacs]]></category>
		<category><![CDATA[tacplus]]></category>
		<category><![CDATA[tac_plus]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=191</guid>
		<description><![CDATA[Short howto on Configure Tacacs+ and Rancid on Juniper.
Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.
Install tcp_wrappers and tacacs
yum install -y tcp_wrappers
yum install -y tcp_wrappers-devel
yum install -y tcp_wrappers-libs
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz
tar zxvf tacacs+-F4.0.4.15.tar.gz
cd tacacs+-F4.0.4.15
./configure
make
make install
Setup tacacs.conf
key = &#8220;secretkey&#8221;
accounting file = /var/log/tac_plus
acl = HomeNet {
permit = 10.2.2.1
}
user = rancid {
default [...]]]></description>
			<content:encoded><![CDATA[<p>Short howto on Configure Tacacs+ and Rancid on Juniper.</p>
<p>Download Tacacs from : ftp://ftp.shrubbery.net/pub/tac_plus/  also you will need tcp_wrappers for tac_plus to work.</p>
<p><strong>Install tcp_wrappers and tacacs</strong></p>
<blockquote><p>yum install -y tcp_wrappers<br />
yum install -y tcp_wrappers-devel<br />
yum install -y tcp_wrappers-libs<br />
Download  ftp://ftp.shrubbery.net/pub/tac_plus/tacacs+-F4.0.4.15.tar.gz<br />
tar zxvf tacacs+-F4.0.4.15.tar.gz<br />
cd tacacs+-F4.0.4.15<br />
./configure<br />
make<br />
make install</p></blockquote>
<p><strong>Setup tacacs.conf</strong></p>
<blockquote><p>key = &#8220;secretkey&#8221;<br />
accounting file = /var/log/tac_plus<br />
acl = HomeNet {<br />
permit = 10.2.2.1<br />
}<br />
user = rancid {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}<br />
}<br />
user = giany {<br />
default service = permit<br />
login = cleartext mypass<br />
enable = cleartext mypass<br />
service = junos-exec {<br />
local-user-name = operations<br />
}</p>
<p>}</p></blockquote>
<p><strong>Configure Juniper Tacacs</strong></p>
<blockquote><p>set system authentication-order [ tacplus password ]</p>
<p>set system tacplus-server 10.2.2.1 secret secretkey<br />
set system accounting events login<br />
set system accounting events interactive-commands<br />
set system accounting destination tacplus<br />
set system login class network permissions network<br />
set system login class network permissions view<br />
set system login user operations full-name &#8220;Users with Full Access&#8221;<br />
set system login user operations uid 9999<br />
set system login user operations class super-user<br />
set system login user operations authentication encrypted-password &#8220;xxx&#8221;<br />
set system login user restricted full-name &#8220;Restricted&#8221;<br />
set system login user restricted uid 2000<br />
set system login user restricted class read-only<br />
set system login user restricted authentication encrypted-password &#8220;xxx&#8221;</p></blockquote>
<p><strong>RANCID</strong></p>
<blockquote><p># adduser rancid<br />
Download ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.1.tar.gz<br />
# tar zxvf rancid-2.3.1.tar.gz<br />
# cd rancid-2.3.1<br />
# ./configure &#8211;prefix=/home/rancid<br />
# su &#8211; rancid<br />
# set CVSROOT /home/rancid/var/CVS<br />
# cvs init<br />
# rancid-cvs</p></blockquote>
<p><strong>.cloginrc</strong></p>
<blockquote><p>add method 10.2.2.2 ssh</p>
<p>add method 10.100.100.1 ssh<br />
add user olive rancid<br />
add user cisco rancid<br />
add password olive {mypass} {mypass}<br />
add password cisco {mypass} {mypass}</p></blockquote>
<p><strong>Debug</strong></p>
<blockquote><p>[rancid@box ~]$ clogin cisco<br />
cisco<br />
spawn ssh -c 3des -x -l rancid cisco<br />
rancid@cisco&#8217;s password:<br />
Corp:2&gt;enable<br />
Password:<br />
Corp:2#</p>
<p>[rancid@box ~]$ jlogin olive<br />
olive<br />
spawn ssh -c 3des -x -l rancid olive</p>
<p>WARNING: You are being watched.<br />
rancid@olive&#8217;s password:<br />
&#8212; JUNOS 7.4R2.6 built 2006-01-20 14:27:46 UTC<br />
rancid@olive.x83.net&gt;</p></blockquote>
<blockquote><p># tail -f /var/log/tac_plus</p>
<p>Mon Aug  4 16:20:37 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=263    process*mgd[7038]       cmd=logout<br />
Mon Aug  4 16:26:15 2008        10.100.100.1    rancid  tty2    10.100.100.100  start   task_id=58      timezone=UTC    service=shell<br />
Mon Aug  4 16:26:43 2008        10.100.100.1    rancid  tty2    10.100.100.100  stop    task_id=58      timezone=UTC    service=shell       disc-cause=1    disc-cause-ext=1020     connect-progress=101    elapsed_time=28 nas-rx-speed=0  nas-tx-speed=0<br />
Mon Aug  4 16:26:56 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7045]   cmd=login<br />
Mon Aug  4 16:27:03 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   stop    task_id=1       service=shell   elapsed_time=8      process*mgd[7045]       cmd=logout<br />
Mon Aug  4 16:27:15 2008        10.2.2.2        rancid  ttyp0   olive.x83.net   start   task_id=1       service=shell   process*mgd[7049]   cmd=login</p></blockquote>
<p>Set idle-timeout so after a while a user will get disconnect:</p>
<blockquote><p>login<br />
class admin {<br />
idle-timeout 4;<br />
permissions all;<br />
}<br />
user test {<br />
class admin<br />
}</p></blockquote>
<p>On terminal you will get smth like that:</p>
<blockquote><p>test@br0&gt; Warning: session will be closed in 1 minute if there is no activity<br />
Warning: session will be closed in 10 seconds if there is no activity<br />
Idle timeout exceeded: closing session<br />
Connection closed by foreign host.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/juniper-tacacs-rancid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
