Date: Sun, 23 Sep 2001 09:05:04 +0200 From: Mark Rowlands <mark.rowlands@minmail.net> To: Keith Spencer <bsd2000au@yahoo.com.au>, fbsd <freebsd-questions@FreeBSD.ORG> Subject: Re: For script wizards-> Parse a delimited list to add htusers Message-ID: <20010923070359.ED6C537B411@hub.freebsd.org> In-Reply-To: <20010923005845.88867.qmail@web12006.mail.yahoo.com> References: <20010923005845.88867.qmail@web12006.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 23 September 2001 2:58 am, Keith Spencer wrote: > Hi all, > I have an interesting problem. > I run a school network and have installed squid to > proxy for our ADSL fbsd gateway (4.3 releng) > I have figured out how to get a by-user/password > access challenge from squid. I need to be able to kick > kids off at times. > I am into VB but know nix of Perl etc. > The ideal thing would be to have a web driven user > database on the gateway but It is likely too tricky > for me to do. (see scenario at page bottom) > How can I parse a delimited file like... > user1,password1 > user2,password2 > .... etc > using htpasswd to add each entry to my /etc/inetusers > file > It would be even better if I could just somehow import > the users from the NT domain. But again...know not > how. > So maybe i'll just hit it with a hammer using ftp and > the script you might know how to do... > Anyway here is a scenario (best case) > Maybe you have suggestions for this or a neat solution > ############################# > files = bannedlist , schooluserlist, inetusers > student fires up browser > challenged for user password > if valid ok surf > else if on banned list goodbye > else if not in valid nor banned list then > get them to supply password > addit to htpassword file > let them in > ############################## > What do you think? well, we use a mysql database to store users / rights and then cgi to talk to that. ..... there are utilities to extract users from NT and it's not hard to code a bit of cgi.. I don't think you will find anything "off the shelf" to do this, but you could look at Webmin. (port is in sysutils) to get an idea as to how you can code this sort of thing..... maybe you have a student perl hacker who could help? -- He's got the heart of a little child, and he keeps it in a jar on his desk. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010923070359.ED6C537B411>