Hello!
I have a problem with the tacacs pre/post authorization methode.
(I have a tac_plus F4.0.4.alpha.)
I would like write a shell (or perl) script for the command authorization.
(The autocommand works fine -- in shell script -- , but the command authorization doesn't work.)
The script:
#!/bin/sh
user=$1
nas=$2
if [ $user="test" ] && [ $nas="xxx.xxx.xxx.xxx" ]
then
echo "service=shell"
echo "cmd=show"
echo "cmd-arg=*"
# echo "cmd-arg=permit .*"
# echo autocmd="telnet xxx.xxx.xxx.xxx /stream"
exit 2
fi
user = test {
default service = deny
login = cleartext "test"
after authorization "./authorize $user $name"
service=exec {}
service=shell {}
# cmd = show { permit .* }
}
What's wrong?
Can You send me some examples?
Can You help me?
Thanks,
Jani