Hi Marc,
Thank you for quick answer.
Both "password = mavis"/patch work.
Thanks,
saskiat
--
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 Marc,
now I've found another problem with "password = mavis".
If user has defined tacacs_profile like:
{ password = mavis
service = shell {
default command = permit
There's no problem with loging (without this parameter it work randomly as described in previos mail).
Problem is, that if I have this parameter enabled, and I change
"cmd"
line (add/remove any command), the old commands are still somewhere in
cache and no changes are reflected. If I remove parameter "password =
mavis" from tacacs_profile, the changes of permited/denied commands are
reflected immediately, but there's back problem with random loginng.
In global configuration I have also enabled "mavis noauthcache".
Thank you for idea.
S.
--
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.
To unsubscribe from this group, send email to event-driven-ser...@googlegroups.com.
I'm using configuration with 2 mavis backends, one is
mavis_ldap_authonly.pl (for authentication - only user/pass in ldap) and the second
is modified mavis_tacplus_ldap.pl/mavis_tacplus_sql.pl (authorization - doesn't content password)
Configuration is like:
mavis module = external {
exec = /usr/local/lib/mavis/mavis_tacplus_sql.pl (or mavis_tacplus_ldap.pl)
}
mavis module = external {
exec = /usr/local/lib/mavis/mavis_ldap_authonly.pl
}
It looks, that problem exists in mavis_ldap_authonly.pl,
which causes mavis crash (Catched SIGSEGV. Backtrace:...)
and finally backend failure:
mavis_ldap_authonly.pl: 3942: Use of uninitialized value $passwd in string eq at /usr/share/perl5/Net/LDAP.pm line 365, <> chunk 2.
- in INFO packets is not send password on position 8 as in AUTH packets, so probably mavis_ldap_authonly.pl need fix for INFO.
Cheers,
saskiat
--
Hi Marc,
script in = { if $TACTYPE == INFO skip } looks, that
solve the issue with authorization problem (authorization of commands
works also after "mavis cache timeout" is reached)
But now there are 2 problems:
1. The mavis SIGSEGV - what I did, was only login to device and nothing
more - after 49 seconds (usually its about 1 minute) after
authentication was sigsegv&backtrace in syslog
2. If I try to
login again before sigsegv/backtrace is received, I can't { failed (no
such user)}, if I try it after sigsegv, it looks, that tacacs proces is
automaticaly restarted
and login works (but 1. occurs)
Here are syslog messages, my tac_plus.conf and ldif from ldap and sql example for user 'streda'.
Cheers,
saskiat
----------------------------------------------------------------------------
Oct 12 22:30:57 linserver tac_plus[6202]: 10.0.101.102: shell login for 'streda' from 10.0.101.101 on tty1 succeeded
Oct 12 22:30:57 linserver tac_plus[6202]: res = 1
Oct 12 22:31:46 linserver tac_plus[6202]: Catched SIGSEGV. Backtrace:
Oct 12 22:31:46 linserver tac_plus[6202]: 15 [0x804ac11]
Oct 12 22:31:46 linserver tac_plus[6202]: 14 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7bfc455]
Oct 12 22:31:46 linserver tac_plus[6202]: 13 [0x805a08b]
Oct 12 22:31:46 linserver tac_plus[6202]: 12 /usr/local/lib/libmavis.so(io_main+0x35) [0xb7ea0488]
Oct 12 22:31:46 linserver tac_plus[6202]: 11 /usr/local/lib/libmavis.so(io_sched_exec+0x53) [0xb7ea03c9]
Oct 12 22:31:46 linserver tac_plus[6202]: 10 [0x8059868]
Oct 12 22:31:46 linserver tac_plus[6202]: 9 /usr/local/lib/libmavis.so(RB_delete+0x229) [0xb7e9d3fe]
Oct 12 22:31:46 linserver tac_plus[6202]: 8 [0x805611a]
Oct 12 22:31:46 linserver tac_plus[6202]: 7 /usr/local/lib/libmavis.so(RB_tree_delete+0x2b) [0xb7e9d183]
Oct 12 22:31:46 linserver tac_plus[6202]: 6 /usr/local/lib/libmavis.so [0xb7e9d144]
Oct 12 22:31:46 linserver tac_plus[6202]: 5 [0x8054b43]
Oct 12 22:31:46 linserver tac_plus[6202]: 4 /usr/local/lib/libmavis.so(RB_tree_delete+0x2b) [0xb7e9d183]
Oct 12 22:31:46 linserver tac_plus[6202]: 3 /usr/local/lib/libmavis.so [0xb7e9d144]
Oct 12 22:31:46 linserver tac_plus[6202]: 2 [0x8054b43]
Oct 12 22:31:46 linserver tac_plus[6202]: 1 [0xb7eed40c]
Oct 12 22:31:46 linserver tac_plus[6202]: 0 /usr/local/lib/libmavis.so(catchsegv+0x2d) [0xb7ea9a4e]
---------------------------------------------------------------------------
id = spawnd {
background = no
listen = { port = 49 }
spawn = {
instances min = 1
instances max = 10
}
}
id = tac_plus {
mavis module = external {
exec = /usr/local/bin/mavis_tacplus_sql.pl
}
mavis module = external {
setenv LDAP_SERVER_TYPE = "tacacs_schema"
setenv LDAP_HOSTS = "localhost"
setenv LDAP_BASE = "ou=tacacs,dc=my,dc=domain,dc=tld"
exec = /usr/local/bin/mavis_ldap_authonly.pl
script in = { if $TACTYPE == INFO skip }
}
user backend = mavis
login backend = mavis
mavis noauthcache
mavis cache timeout = 1
host = 0.0.0.0/0 {
key = "foo"
}
--------------------------------------------------------------------------
ldif:
dn: uid=streda,ou=tacacs,dc=my,dc=domain,dc=tld
uid: streda
objectClass: simpleSecurityObject
objectClass: tacacsAccount
objectClass: OpenLDAPperson
cn: streda
sn: streda
userPassword: {CRYPT}4/foo.foo
--------------------------------------------------------------------------
sql:
tcs_uid: streda
tcs_client: 10.0.0.0/8
tcs_profile:
{ password = mavis service = shell { default command = deny set
priv-lvl = 15 cmd = show { permit memory permit interfaces permit
version deny .* } } }
Cheers,
saskiat
Cheers,
Marc
Hi Marc,
looks, that patch works (I've downloaded DEVEL.201010101938.tar.bz2), no sigsegv received.
But there's always problem with login, when I login to device
and do logout immediately and I try to login again (time <60s),
"failed (no such user)". If I try to login again after 60s,
it works...
--
av.in:
= (this is succesfull login)
0 TACPLUS
3 883130525
4 streda
8 piatok
14 10.0.101.101
21 WUIBZiCANAe5DZ89aL5lqg=
25 10.0.101.102
49 AUTH
=(failed, no such user)
0 TACPLUS
3 -1689630805
4 streda
8 piatok
14 10.0.101.101
21 2K6wBbNZTo5V1eKbfDX1bQ=
25 10.0.101.102
49 AUTH
------------------------
av.out:
= (this is succesfull login)
0 TACPLUS
3 883130525
4 streda
6 ACK
8 piatok
14 10.0.101.101
21 WUIBZiCANAe5DZ89aL5lqg=
25 10.0.101.102
36 piatok
46 10.0.0.0/8
48
{ password = mavis service = shell { default command = deny set
priv-lvl = 15 cmd = show { permit memory permit interfaces permit
version deny .* } } }
49 AUTH
= (failed, no such user)
0 TACPLUS
3 -1689630805
4 streda
6 ACK
8 piatok
14 10.0.101.101
21 2K6wBbNZTo5V1eKbfDX1bQ=
25 10.0.101.102
36 piatok
46 10.0.0.0/8
48 { password = mavis service = shell { default command = deny set
priv-lvl = 15 cmd = show { permit memory permit interfaces permit
version deny .* } } }
49 AUTH
Cheers,
saskiat
--
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.
2010/10/16 saskia s. <sas...@gmail.com>:
> Could I ask, what was the problem (simple desc) and if this code will be in
> "official" release?
the lookup_user function honours dynamic user lifetime and returns a
NULL pointer if lifetime is exceeed. The user object, however, then
still exists in the usertable, and needs to be removed before a new
one with the same username can be inserted successfully.
Thanks,
Marc
Cheers,
Marc
2010/10/17 Marc Huber <marc.j...@googlemail.com>:
Thank you for information.
Btw, it looks, that example in part 4.6.4. CLI Contexts
doesn't work, for example "cmd =~ /^interface FastEthernet 0\/1 /"
crashes on space between "interface" and "FastEthernet".
Cheers,
Saskia
is the router configured to use single-connection?
tacacs-server host .... single-connection key ...
Thanks,
Marc
2010/10/26 saskia s. <sas...@gmail.com>:
> --
> 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.