[tac_plus] managing accounts
Asif Iqbal
vadud3 at gmail.com
Thu May 22 16:48:21 UTC 2014
On Thu, May 22, 2014 at 12:27 PM, heasley <heas at shrubbery.net> wrote:
> Thu, May 22, 2014 at 12:26:10PM -0400, Asif Iqbal:
> > Any one has tool to manage user accounts on tac_plus.conf?
> >
> > Looking for adding/deleting multiple users.
> >
> > Adding/Modifying/Deleting them manually with an editor is painful.
>
> why not do it in a database/elsewhere and export it to the config file?
>
I would go with mysql then.
Most of them are like below.
user = vtt2440 {
login = PAM
member = opsdb
}
So creating a schema and inserting these data would be pretty simple
CREATE TABLE Users (
user varchar(20) primary key,
login varchar(20),
member varchar(20)
);
INSERT INTO Users (`user`, `login`,`member`) VALUES ("vtt2440","PAM",
"opsdb");
But I will need some help with parsing this into a txt file and then just
LOAD DATA INFILE
would save lot of time with ~2000 users.
However, how would I manage stanza like this? Should I just move those cmds
inside group
definition?
user = ssarepts {
login = file /etc/tacacs-passwd
cmd = terminal {
permit "length"
deny .*
}
cmd = show {
permit "interfaces|policy-map interface"
deny .*
}
cmd = exit {
permit .*
}
}
So looks like really need help with parsing these and normalize to rows,
before I can insert them into database.
Thanks for any help with parsing.
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/tac_plus/attachments/20140522/90809d89/attachment.html>
More information about the tac_plus
mailing list