Frank Boehme wrote:
> Ok, I believe I understood (not quite sure...). Would someone please
> admit that this stuff is a mindboggliong matter?
Admitted. The implementation is really, really simple though.
> I am now setting things up and I quickly realise that I need a good
> script for this. To add a user, I have to:
>
> 1. Add a admin/user host pair to httpd.conf. MidgardDatabase might be
> called usrN.
> 2. Create a db usrN
> 3. Edit the table mysql.db so that mysql-user midgard has write privs on
> usrN
> 4. Create the tables in usrN
> 5. Populate person and member (maybe grp too?) in usrN so that an
> administrator exists
> 6. Create a host entry in the page db
> 7. Restart apache
>
> Seems very longwinded. Has anyone a script that does this? Also, what is
> the minumum to be done at step 5? Jesus....this is a tricky matter!!
You could do that. What I would do, though, is add mod_perl to apache,
and use something like
http://www.iris-advies.com/php/Emile.Heyns/autohost.conf.
For each new user you would then (replace <ALLCAPS>):
** 1. Create a new database <DB>
** 2. Add the admin site host record
$ echo "INSERT INTO host (name, root, style) VALUES ('admin.<DB>.com',
<SHAREDADMINROOT>, <SHAREDADMINSTYLE>)" | mysql adminsite
** 3. Grant access to the table
$ echo "INSERT INTO db (Host,User,Db,Select_priv,Insert_priv,Update_priv,Delete_priv)
VALUES ('localhost','<COMMONUSER'>,'<DB>','Y','Y','Y','Y')" | mysql mysql
** 4. Create an admin user. Group 0 is fictious and means root access.
$ echo "INSERT INTO person (id,username,password) VALUES
(1,'admin',Password('<YOUCHOOSE>'))" | mysql DB
$ echo "INSERT INTO member (uid,gid) VALUES (1,0)" | mysql DB
** 5. restart apache
You'll have to adjust both the perlconfig stuff and the commands above
to your situation; I assume it's more likely that you'll use
admin.user.domain.com than straight TLDs.
Emile, back to sleep :)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]