readers.conf and authentication question

Jeffrey M. Vinocur jeff at litech.org
Tue Oct 21 13:34:43 UTC 2003


On Tue, 21 Oct 2003 g.lams at itcilo.it wrote:

> For instance, in our case, no newsgroup is public (i.e anonymously 
> accessible), but there are a few newsgroups which are accessible by all 
> the students (in addition to the newsgroup of their own course).
>
> Another question: let's say I write a perl cgi that would allow those 
> "teachers" to create from the web a newsgroup (automatically creating the 
> htpasswd file), I would then need to add the Auth and Access section in 
> the readers.conf. As those sections would always be the same, I suppose I 
> could automatically add them at the end of the file, couldn't I?

Ah, in this case, you definitely need something more powerful than
ckpasswd.  In particular, you should use the perl_access feature of
readers.conf (see doc/hook-perl for documentation).  This will allow you
to have a non-changing readers.conf, a non-changing Perl script, and a
modifyable database of some kind.  This database could be a plaintext file
of some format you find useful, one of the sorts of database-in-a-file you
can access with Perl's "tie" feature (like DB_File or something), or some
sort of external database like LDAP.

The CGI would write to the database, and then the perl_access script would 
read it and dynamically generate the list of groups that user can read.


-- 
Jeffrey M. Vinocur
jeff at litech.org



More information about the inn-workers mailing list