<?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>TACACS+ stuff &#187; Uncategorized</title>
	<atom:link href="http://tacacs.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://tacacs.org</link>
	<description>Casting Light on the Dark Art of TACACS+</description>
	<lastBuildDate>Thu, 27 Oct 2011 21:04:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cisco Nexus</title>
		<link>http://tacacs.org/2011/10/27/cisco-nexus/</link>
		<comments>http://tacacs.org/2011/10/27/cisco-nexus/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 21:04:07 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=154</guid>
		<description><![CDATA[The nexus seems to asks for pap authentication.  I have no clue why, but adding a simple &#8220;pap = des -hash-&#8221; to your tac_plus makes it work.  (doesn&#8217;t seem to be necessary if you are setting a default authentication)  

Tacacs on Nexus is different.  However, you can still continue to use [...]]]></description>
			<content:encoded><![CDATA[<p>The nexus seems to asks for pap authentication.  I have no clue why, but adding a simple &#8220;pap = des -hash-&#8221; to your tac_plus makes it work.  (doesn&#8217;t seem to be necessary if you are setting a default authentication)  </p>

<p>Tacacs on Nexus is different.  However, you can still continue to use tacacs the way you always have.  Example configuration is as such:</p>

<p><code>
tacacs-server key -key-<br />
tacacs-server host -host-<br />
aaa group server tacacs+ private<br /> 
&nbsp;&nbsp;&nbsp;&nbsp;server -host, yes again-<br />
&nbsp;&nbsp;&nbsp;&nbsp;use-vrf management<br />
&nbsp;&nbsp;&nbsp;&nbsp;source-interface mgmt0<br />
aaa authentication login default group private<br /> 
aaa authorization config-commands default group private<br /> 
aaa authorization commands default group private<br />
aaa accounting default group private<br />
</code></p>

<p>Gone are the priviledge levels, but adding a simple &#8220;conf t.*&#8221; to the denied commands in do_auth accomplishes pretty much the same thing. </p>

<p>Cisco changed the tac keys.  (Because&#8230; standardization is bad?)  They also changed the accounting format, meaning I had to rewrite my search cgi.  (post if you are interested in front end to search log)  Hence, a new version of do_auth.</p>

<p>v1.8 <a href="http://pastie.org/2769727">http://pastie.org/2769727</a></p>

<p>If anybody has any luck successfully passing roles to the nexus, please post on the tac_plus list.  </p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/10/27/cisco-nexus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>do_auth &#8211; av_pairs</title>
		<link>http://tacacs.org/2011/09/07/do_auth-av_pairs/</link>
		<comments>http://tacacs.org/2011/09/07/do_auth-av_pairs/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:25:14 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=143</guid>
		<description><![CDATA[One of the long promised features has finally been added, the ability to modify av pairs.  Let&#8217;s say you have a group which you simply want a user to have enable access to.  Simply add this to the group:


av_pairs =
&#160;&#160;&#160;&#160;priv-lvl=1


This assumes you have priv-lvl in your tac&#95;plus.conf.  (Like examples previous)  Note, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the long promised features has finally been added, the ability to modify av pairs.  Let&#8217;s say you have a group which you simply want a user to have enable access to.  Simply add this to the group:</p>

<p><code>
av_pairs =<br />
&nbsp;&nbsp;&nbsp;&nbsp;priv-lvl=1<br />
</code></p>

<p>This assumes you have priv-lvl in your tac&#95;plus.conf.  (Like examples previous)  Note, of course, you&#8217;ll also need to add a command&#95;deny for enable or they&#8217;ll just type &#8216;en&#8217; if they have an enable password.  Now, this should open all sorts of opportunities for wlc and roles.  For reasons unknown, this does not work.  <strong>If you have a wlc that you can lab up &amp; wireshark, please contact me on the tac_plus listserv. </strong></p>

<p>v1.7 <a href="http://www.pastie.org/2499657">http://www.pastie.org/2499657</a></p>

<p>One last thing, don&#8217;t use v1.6 &#8211; it had a bug.  Also sorry if you&#8217;re comments don&#8217;t get approved, apparently I don&#8217;t have rights to do that.  </p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/09/07/do_auth-av_pairs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Hash CGI</title>
		<link>http://tacacs.org/2011/08/26/password-hash-cgi/</link>
		<comments>http://tacacs.org/2011/08/26/password-hash-cgi/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:36:39 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=136</guid>
		<description><![CDATA[I threw this cgi together quick so users could send me a SHA-512 hashed password generated from a webpage instead of command line.  (For use in tac_plus)  Suggestions welcome. 

http://pastie.org/2433995 
]]></description>
			<content:encoded><![CDATA[<p>I threw this cgi together quick so users could send me a SHA-512 hashed password generated from a webpage instead of command line.  (For use in tac_plus)  Suggestions welcome. </p>

<p><a href="http://pastie.org/2433995">http://pastie.org/2433995 </p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/08/26/password-hash-cgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New do_auth (again)</title>
		<link>http://tacacs.org/2011/08/23/new-do_auth-again/</link>
		<comments>http://tacacs.org/2011/08/23/new-do_auth-again/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 03:54:29 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=125</guid>
		<description><![CDATA[I finally got a chance to play with some tac pairs that weren&#8217;t exec=shell when I needed to put tacacs on the cisco wireless controller.  (See post below, it uses the concept of &#8220;roles&#8221; which can be looked up)  Had to make adjustments to make sure the keys set in tac_plus.conf worked.  [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got a chance to play with some tac pairs that weren&#8217;t exec=shell when I needed to put tacacs on the cisco wireless controller.  (See post below, it uses the concept of &#8220;roles&#8221; which can be looked up)  Had to make adjustments to make sure the keys set in tac_plus.conf worked.  New code here:</p>

<p>V 1.6 &#8211; removed</p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/08/23/new-do_auth-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Misc TACACS+ questions</title>
		<link>http://tacacs.org/2011/07/06/misc-tacacs-questions/</link>
		<comments>http://tacacs.org/2011/07/06/misc-tacacs-questions/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 16:53:32 +0000</pubDate>
		<dc:creator>jpayne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=114</guid>
		<description><![CDATA[I&#8217;ve received a couple of comments posing questions, but they&#8217;ve been hiding out on the &#8220;About&#8221; page.   I&#8217;m going to move them to this post so others can see and answer.

This is hopefully where new questions can be posed.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received a couple of comments posing questions, but they&#8217;ve been hiding out on the &#8220;About&#8221; page.   I&#8217;m going to move them to this post so others can see and answer.</p>

<p>This is hopefully where new questions can be posed.</p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/07/06/misc-tacacs-questions/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Brocade</title>
		<link>http://tacacs.org/2011/03/16/brocade/</link>
		<comments>http://tacacs.org/2011/03/16/brocade/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 20:51:46 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Brocade]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=108</guid>
		<description><![CDATA[My first time putting tacacs on a Brocade.  Pretty similar to cisco, the tac pairs that cisco use seem to work just fine.  Worked great with do_auth.  Keep in mind, although they honor priv-15, they map it to 0, just to be different.  I used the following:

username admin password yerpasswordhere
ip tacacs [...]]]></description>
			<content:encoded><![CDATA[<p>My first time putting tacacs on a Brocade.  Pretty similar to cisco, the tac pairs that cisco use seem to work just fine.  Worked great with do_auth.  Keep in mind, although they honor priv-15, they map it to 0, just to be different.  I used the following:</p>

<p><code>username admin password yer<em>password</em>here<br />
ip tacacs source-interface loopback 1<br />
tacacs-server retransmit 2<br />
tacacs-server timeout 2<br />
tacacs-server host yer<em>host</em>here<br />
tacacs-server key yer<em>key</em>here<br />
enable super-user-password again<em>password</em>here<br />
aaa authentication login default tacacs+ enable<br />
aaa authentication login privilege-mode<br />
aaa authentication enable default tacacs+ enable<br />
aaa authorization commands 0 default  tacacs+ none<br />
aaa authorization exec default  tacacs+<br />
aaa accounting commands 0 default start-stop  tacacs+<br />
aaa accounting exec default start-stop  tacacs+<br />
enable aaa console</code></p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/03/16/brocade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing Rancid with do_auth</title>
		<link>http://tacacs.org/2011/03/02/securing-rancid-with-do_auth/</link>
		<comments>http://tacacs.org/2011/03/02/securing-rancid-with-do_auth/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 19:43:25 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tacacs.org/?p=88</guid>
		<description><![CDATA[Rancid can be made much more secure by using doauth.  A quick example of the doauth.ini file is as follows:

[users]
rancid =
&#160;&#160;&#160;&#160;&#160;rancidaccess
[rancidaccess]
hostallow =
&#160;&#160;&#160;&#160;&#160;10.0.0.1
devicepermit =
&#160;&#160;&#160;&#160;&#160;.* 
command_permit =
&#160;&#160;&#160;&#160;&#160;show.* 
&#160;&#160;&#160;&#160;&#160;dir.* 
&#160;&#160;&#160;&#160;&#160;more.*
&#160;&#160;&#160;&#160;&#160;write t.* 


Now, rancid can only login from 10.0.0.1, and only type commands that match those regular expressions.  Technically, you could limit the commands in tacplus.conf without [...]]]></description>
			<content:encoded><![CDATA[<p>Rancid can be made much more secure by using do<em>auth.  A quick example of the do</em>auth.ini file is as follows:</p>

<p><code>[users]<br />
rancid =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rancid<em>access<br />
[rancid</em>access]<br />
host<em>allow =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.0.0.1<br />
device</em>permit =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command_permit =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dir.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;more.*<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write t.* <br />
</code></p>

<p>Now, rancid can only login from 10.0.0.1, and only type commands that match those regular expressions.  Technically, you could limit the commands in tac<em>plus.conf without do</em>auth.  Might take longer, but you could do it.  However, you could not limit it to 10.0.0.1 without an after authorization script such as do_auth.</p>

<p>NOTE:  This assumes you only authorize config/Level 15 commands.  I never authorize level 1 commands or, heaven forbid, level 0 commands as these commands can not change anything on the router, nor allow you to see the configuration.  Now, if YOU choose to do so, the above example will still probably work.  A quick look at log.txt will tell you any additional commands you will need to add.</p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2011/03/02/securing-rancid-with-do_auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easier Tacacs Configurations with do_auth</title>
		<link>http://tacacs.org/2009/09/26/easy-tacacs-control-with-do_auth/</link>
		<comments>http://tacacs.org/2009/09/26/easy-tacacs-control-with-do_auth/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 23:05:52 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sackheads.org/tacacsplus/?p=60</guid>
		<description><![CDATA[We&#8217;ve gone over how you can make your tacacs configuration really secure but complicated.  Let&#8217;s show how doauth can actually make configuration easier.  It&#8217;s much easier to edit the doauth.ini file than the tac_plus.conf file.  In fact, we can make adding a default user as easy as typing &#8220;adduser&#8221;.  

I would [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve gone over how you can make your tacacs configuration really secure but complicated.  Let&#8217;s show how do<em>auth can actually make configuration easier.  It&#8217;s much easier to edit the do</em>auth.ini file than the tac_plus.conf file.  In fact, we can make adding a default user as easy as typing &#8220;adduser&#8221;.  </p>

<p>I would post the compiled code, but it&#8217;s too difficult to get a hold of John these days.  (Something about a baby, I dunno)  It&#8217;s trivial to compile:
<code>dan@dan-desktop:~$ python<br />
Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03) <br />
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2<br />
Type "help", "copyright", "credits" or "license" for more information.<br />
&gt;&gt;&gt; import py<em>compile<br />
&gt;&gt;&gt; py</em>compile.compile("do<em>auth.py")<br />
&gt;&gt;&gt; quit()</code><br />
First, a starting tac</em>plus.conf file.  Which, we&#8217;ll never have to edit again:</p>

<p><code># My simple tac<em>plus config that never needs to change<br />
key = my</em>key<br />
accounting file = /var/log/tac<em>plus.acct<br />
default authentication = file /etc/passwd<br />
user = DEFAULT {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;member = do</em>auth<em>access<br />
}<br />
group = do</em>auth<em>access {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default service = permit<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service = exec { priv-lvl = 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idletime = 10 }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enable = file /etc/passwd<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after authorization "/usr/bin/python /root/do</em>auth.pyc -i $address -u $user -d $name -l /root/log.txt -f /root/do_auth.ini"
}</code><br /></p>

<p>Most important &#8211; after authorizaion line is <strong>one line, not two.  The $ means it wrapped.</strong></p>

<p>Now, we add homer and give him access to some show commands.  Fist, we do a adduser homer on linux to add the user.  This way, when the user wants to change is password, he can any time he wants to with passwd.   Next, we edit the do_auth.ini file</p>

<p><code>[users]<br />
homer =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;few<em>commands<br />
[few</em>commands]<br />
host<em>allow =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
device</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command_permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show users<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show ip int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show controllers.*</code> <br /></p>

<p>And, you&#8217;re done.  Well, I&#8217;d add some tabs to each command that got stripped above(blogs/wiki&#8217;s can be annoying), but that&#8217;s about it. </p>

<p>Let&#8217;s compare that to the tac_plus.conf config:</p>

<p><code>user = homer {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;member = limited<em>access<br />
}<br />
group = limited</em>access {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default service = deny<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;acl = limited_acl<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service = exec {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;priv-lvl = 15<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idletime = 10<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd = show {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permit "running-config.*" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permit "ip int*" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permit "inter.*" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permit "controllers.*" <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code> <br /></p>

<p>In my small do_auth python program, we have no permits, no “”, and no {}.  Much easier and the no need to restart the daemon.  To add an admin user is even easier.  Adduser admin in linux, then add:</p>

<p><code>admin = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;admin<em>user<br />
[admin</em>user]<br />
host<em>allow =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
device</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command_permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.*</code> <br /></p>

<p>So, our final config is very easy:</p>

<p><code>[users]<br />
homer =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;few<em>commands <br />
admin = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;admin</em>user <br />
[few<em>commands] <br />
host</em>allow = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
device<em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show users <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show ip int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show controllers.* <br />
[admin<em>user] <br />
host</em>allow = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
device<em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.*</code> <br /></p>

<p>As if this weren&#8217;t easy enough, let&#8217;s say 99% of your users are these limited access users.  Wouldn&#8217;t it be nice to just do an adduser and be done without any config modification?  All we need is a default user.  In our example above we would change to this:</p>

<p><code>[users] <br />
default = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;few<em>commands <br />
[few</em>commands] <br />
host<em>allow = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
device</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
command_permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show users <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show ip int.* <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show controllers.*</code> <br /></p>

<p>Now, whenever we do an adduser, it automatically gets this level of access. </p>

<p>From here, we can make it as simple or as complicated as we want.  Restrict them to certain device, make them connect from connect from certain IP&#8217;s, ect.  We can maybe even begin to work on a web front end.  (Maybe someday when I get time&#8230;..)</p>

<p>-Dan Schmidt</p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2009/09/26/easy-tacacs-control-with-do_auth/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Granular Tacacs Control (Yes, you can do multiple groups)</title>
		<link>http://tacacs.org/2009/05/08/granular-tacacs-control/</link>
		<comments>http://tacacs.org/2009/05/08/granular-tacacs-control/#comments</comments>
		<pubDate>Fri, 08 May 2009 23:17:45 +0000</pubDate>
		<dc:creator>helpdeskdan</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.sackheads.org/tacacsplus/?p=34</guid>
		<description><![CDATA[By using an authorization script, we can make tacplus to do very granular authentication, having different permissions granted to different switches defined by user, source IP and device IP.  However, writing/editing a script to change access can be difficult.  Hard coded authorization scripts are not very flexible, hence, I decided to implement a python program [...]]]></description>
			<content:encoded><![CDATA[<p>By using an authorization script, we can make tac<em>plus to do very granular authentication, having different permissions granted to different switches defined by user, source IP and device IP.  However, writing/editing a script to change access can be difficult.  Hard coded authorization scripts are not very flexible, hence, I decided to implement a python program to facilitate flexibility.  It is now included in the tac</em>plus package.</p>

<p>Configuration is fairly simple; as an example, let&#8217;s say I wanted to have user Homer have full access to 192.168.1.1 and 10.1.1.0/24, but only do show commands for everything else in 10.0.0.0/8.  For the heck of it, let&#8217;s say we only want Homer to connect from 192.168.1.0/24, but never 192.168.1.4, which host can only do the show commands.   The config file would simply be as follows:</p>

<p><code>[users]<br />
homer =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simpson<em>group<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;television</em>group<br />
[simpson<em>group]<br /> 
host</em>deny =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;192.168.1.4<br />
host<em>allow =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;192.168.1.*<br />
device</em>permit =<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;192.168.1.1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.1.1.* <br />
command<em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.* <br />
[television</em>group] <br />
host<em>allow = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;192.168.1.* <br />
device</em>permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.* <br />
command_permit = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show.*</code> <br /></p>

<p>Example line to put in tac<em>plus user or group:
after authorization &#8220;/usr/bin/python /root/do</em>auth.pyc -i $address -u $user -d $name -l /root/log.txt -f /root/do_auth.ini&#8221;
(that&#8217;s all ONE line)</p>

<p>On my server, I set homer&#8217;s password file to /etc/passwd and enable cracklib.  Homer can change his password any time he wants just by logging to Linux and typing passwd – he does not need root access.  Homer is also forced to pick a secure password, and has different access based on different devices.  Given these abilities, combined with the quick administration, tac_plus makes purchasing Cisco&#8217;s tacacs server seem like a waste of money.</p>

<p>In the future, I may alter the program to have the ability to send back additional av-pairs, and/or completely new av-pairs.   However, currently I simply don&#8217;t need this feature as I pass these pairs back to tac<em>plus.  The source code is very simple and is GPL&#8217;ed for all to see at: <a href="http://pastie.org/506002">http://pastie.org/506002</a> and is available in compiled/ready to use form <a href="http://tacacs.org/files/2009/05/do_auth.pyc">here</a>.   For more instructions, you can download this compiled pyc and type “python do</em>auth.pyc” If I ever get time, I may consider a gui or web interface.</p>

<p>Update: New version 1.2
Fixed pix.  Also, apparently there is a bug in the pix that makes it necessary to add a 0.0.0.0 to your allowed hosts.</p>

<p>-Dan Schmidt</p>
]]></content:encoded>
			<wfw:commentRss>http://tacacs.org/2009/05/08/granular-tacacs-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

