I am trying to get tacacs working on FreeBSD 7.2, authenticating using
Active Directory. I have done my configuration file and checked it for
errors and all is well. For some reason, I cannot get authenticated
from a test CISCO switch, i get no logs entries so I am blind on
that.
I do get to see that my attempts have failed by running show tacacs on
the CISCO switch. I have tried to telnet port 49 of the tacacs server
from the switch and I can get to it.
any pointers?
PS: Below is my conf file
#!/usr/local/bin/tac_plus
# spawnd Configuration. We want to listen on port 49, with a minimun
of one process and
# a maximum of 10 processes. We also want this to run in the
backgroud.
id = spawnd {
listen = {
port = 49
address=192.168.0.1
}
spawn = {
instances min = 1
instances max = 10
}
background = yes
}
# Tacacs+ Configuration options. NOTE: All that is required for
tac_plus is done in here. We are also
# going to use the MAVIS authentication modules.
id = tac_plus {
# Gobal configuration
access log = /var/log/tacacs/%Y/%m/%d/access.log
accounting log = /var/log/tacacs/%Y/%m/%d/accounting.log
umask = 0640
userid = tacacs
groupid = tacacs
# enable = login
login backend = mavis
pap backend = mavis
mavis module = external {
setenv LDAP_HOSTS = "192.168.0.2:389 192.168.0.3:389"
setenv LDAP_SCOPE = sub
setenv LDAP_BASE = "OU=Office Users,dc=mydomain,dc=com"
setenv LDAP_FILTER = "(&(objectclass=user)(sAMAccountName=
%s))"
setenv LDAP_USER = "DOMAIN\\nms"
setenv LDAP_PASSWD = "password"
setenv TACACS_GROUP_PREFIX = tacacs
# setenv REQUIRE_TACACS_GROUP_PREFIX = 1
setenv USE_TLS = 0
exec = /usr/local/lib/mavis/mavis_tacplus_ads.pl
}
# Host configuration
host = world {
address = ::/0
prompt = "\nWelcome\nHitherto shalt thou come, but no further.
\n\n"
key = 0uLR0
}
host = remoteoffice {
template = world
address = 172.19.67.0/25
}
host = remoteoffice1 {
template = world
address = 172.19.2.32/28
}
host = remoteoffice2 {
template = world
address = 172.19.20.0/24
}
# Users and Groups Configuration
# A user will be in the "admin" group if he's member of the
# corresponding "tacacsadmin" ADS group.
group = admin {
default service = permit
service = shell {
default command = permit
default attribute = permit
set priv-lvl = 15
}
}
# A user will be in the "helpdesk" group if he's member of the
# corresponding "tacacshelpdesk" ADS group:
group = helpdesk {
default service = permit
service = shell {
default command = permit
default attribute = permit
set priv-lvl = 1
}
enable = deny
#member = admin@helpdesklab
}
}
--
You received this message because you are subscribed to the Google Groups "Event-Driven Servers" group.
To post to this group, send email to event-driv...@googlegroups.com.
To unsubscribe from this group, send email to event-driven-ser...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/event-driven-servers?hl=en.
Hi Mike,
please add "user backend = mavis" to the tac_plus section. This will tell the daemon to actually query the AD server for users not defined in the plain-text file. I guess that part is missing in the sample configuration. My apologies ...
For testing authentication you may use the "mavistest" program:
mavistest /usr/local/etc/tac_plus.cfg tac_plus TACPLUS joe p4ssw0rd
or, with full debugging enabled:
mavistest -d -1 /usr/local/etc/tac_plus.cfg tac_plus TACPLUS joe p4ssw0rd
first, can you please check whether the authentication script works stand-alone?
printf "0 TACPLUS\n4 mike\n8 yourpassword\n49 AUTH\n=\n" | env
LDAP_HOSTS="192.168.0.2:389 192.168.0.3:389" LDAP_SCOPE=sub
LDAP_BASE="OU=Office Users,dc=mydomain,dc=com" LDAP_FILTER =
'(&(objectclass=user)(sAMAccountName=%s))' LDAP_USER="DOMAIN\\nms"
LDAP_PASSWD="password" TACACS_GROUP_PREFIX=tacacs
/usr/local/lib/mavis/mavis_tacplus_ads.pl
If this doesn't work as expected: Please re-compile with debugging support:
make clean; configure --debug tac_plus; make install
Then call mavistest (with -d -1) again. Output should be more useful now ;-)
Cheers,
Marc
Hi Mike,
first, can you please check whether the authentication script works stand-alone?
printf "0 TACPLUS\n4 mike\n8 yourpassword\n49 AUTH\n=\n" | env
LDAP_HOSTS="192.168.0.2:389 192.168.0.3:389" LDAP_SCOPE=sub
LDAP_BASE="OU=Office Users,dc=mydomain,dc=com" LDAP_FILTER =
'(&(objectclass=user)(sAMAccountName=%s))' LDAP_USER="DOMAIN\\nms"
LDAP_PASSWD="password" TACACS_GROUP_PREFIX=tacacs
If this doesn't work as expected: Please re-compile with debugging support:
make clean; configure --debug tac_plus; make install
Then call mavistest (with -d -1) again. Output should be more useful now ;-)
2010/2/24 Mike Barnard <mike.b...@gmail.com>:
> 34012: + mavis_init
> 34012: - mavis_init: FATAL: no modules configured
the module search path (usually /usr/local/lib/mavis/, IIRC) might not
match the actual module directory. Does setting
mavis path = ...
to the module directory (within the tac_plus section) help?
Cheers,
Marc
ok, one problem with mavistest is that it doesn't really understand
the complete tac_plus (or ftpd or whatever) configuration and
basically only searches for the "mavis" keyword. This simplicistic
approach fails miserably in a couple of corner-cases.
Simply re-ordering the configuration file will make mavistest work --
just put all the "login/pap/user backend = mavis" declarations *after*
the "mavis module = external { ... }" block, then run mavistest again.
The output might give some pointers.
Thanks,
Marc
On 24 Feb., 15:45, Marc Huber <marc.j.hu...@googlemail.com> wrote:
> Hi Mike,
>
> 2010/2/24 Mike Barnard <mike.barna...@gmail.com>:
Hi Mike,
ok, one problem with mavistest is that it doesn't really understand
the complete tac_plus (or ftpd or whatever) configuration and
basically only searches for the "mavis" keyword. This simplicistic
approach fails miserably in a couple of corner-cases.
Simply re-ordering the configuration file will make mavistest work --
just put all the "login/pap/user backend = mavis" declarations *after*
the "mavis module = external { ... }" block, then run mavistest again.
The output might give some pointers.
great, that means that backend communication is fine :-)
It's probably time to get deeper into debugging: Please add
debug = PACKET AUTHEN AUTHOR MAVIS
or, for complete debugging output,
debug = -1
to the tac_plus section, plus
debug redirect = /tmp/tac_plus-debug.log
Then restart the daemon. The log file should hopefully contain some
helpful information.
Cheers,
Marc
It's probably time to get deeper into debugging: Please add
debug = PACKET AUTHEN AUTHOR MAVIS
or, for complete debugging output,
debug = -1
to the tac_plus section, plus
debug redirect = /tmp/tac_plus-debug.log
I just tested the daemon in a FreeBSD 7.0 virtual machine, and it
appears to work just fine.
Can you please have a look at the system logs? Anything interesting in
/var/log/uucp? Yes, I know, this isn't the most obvious place to look.
One more thing you can try: Add "debug = -1" to the spawnd section,
and change the "background" directive to "no". Then start the daemon
manually. You will get both spawnd and tac_plus life debugging output
on your terminal. Now, from another terminal, open a telnet session to
port 49.
Cheers,
Marc
Hi Mike,
I just tested the daemon in a FreeBSD 7.0 virtual machine, and it
appears to work just fine.
Can you please have a look at the system logs? Anything interesting in
/var/log/uucp? Yes, I know, this isn't the most obvious place to look.
One more thing you can try: Add "debug = -1" to the spawnd section,
and change the "background" directive to "no". Then start the daemon
manually. You will get both spawnd and tac_plus life debugging output
on your terminal. Now, from another terminal, open a telnet session to
port 49.
On 26 Feb., 11:26, Mike Barnard <mike.barna...@gmail.com> wrote:
> I dont have the uucp logfiles...
you can change log facility and level inside the "id = ... { }"
sections, e.g.:
syslog facility = DAEMON
syslog level = DEBUG
Set these to whatever your syslog daemon actually accepts.
> I cannot add debug to the spawnd section, it dumped an error:
>
> /usr/local/etc/tac_plus.conf:9: Expected 'address', 'path', 'port', 'realm',
> 'tls', 'userid', 'groupid', 'backlog', 'type' or 'protocol', but got 'debug'
You've probably put the "debug" statement inside the "listen { ... }
section. The following would work:
id = spawnd {
debug = -1
listen { ... }
spawn { ... }
}
> Now, this is the strangest part... will all the debugging turned off and
> background set to no, I am able to login using tacacs on my test switch. I
> see nothing being dumped on screen, but I do have an entry in my access.log
> file showing that I have successfully logged in.
>
> I turned on debugging again and left background set to 'no' and I was still
> able to login. I then turned all debugging off and set background to 'yes'
> and I was unable to login.
>
> It seems that when I run the tacacs process in background, something goes
> dead.
Ok, thanks, got it. The kqueue() file descriptor doesn't survive
fork(). I knew that, but didn't notice. Fixed in the most recent
snapshot at
http://www.pro-bono-publico.de/projects/src/DEVEL.201002261642.tar.bz2
> And it appears that any one not in the tacacsadmin group can also
> login :-/
Yes, unless configured with
setenv REQUIRE_TACACS_GROUP_PREFIX = 1
the backend doesn't do any group checking.
Cheers,
Marc