#!/bin/bash

#used for cli command "set system aaa tacacs-plus key"
#input $1:Tacacs+ server shared key
#no output

sed -i "s/\(.*\)secret=\(.*\)login=\(.*\)/\1secret=$1 login=\3/g"  /etc/pam.d/common-account
sed -i "s/\(.*\)secret=\(.*\)login=\(.*\)/\1secret=$1 login=\3/g"  /etc/pam.d/common-auth
sed -i "s/\(.*\)secret=\(.*\)login=\(.*\)/\1secret=$1 login=\3/g"  /etc/pam.d/common-session

exit 0
