[pmwiki-users] HtpasswdForm Problem

Dominique Faure dominique.faure at gmail.com
Wed Jan 16 06:12:55 CST 2008


On Jan 16, 2008 12:23 PM, imoc <blog.oc at gmail.com> wrote:
> Dear list,
>
> I'm a newbie with PmWiki. I've set up the test wiki site,
> it is super easy; I've installed about ten recipes, it's
> easy too. However, when I come to install the
> HtpasswdForm, it became a nightmare.
>
> The cookbook explained so little about how to get it work.
> I've to find so many post here to learn how to put the
> .htpasswd file and make the script know the file.
>
> Any way I finally get something right. Now I have these
> lines in 'config.php':
> =================================\\
>  $DefaultPasswords['edit'] = '@User';
>  $AuthUser['htpasswd'] = 'local/user/.htpasswd';
>  include_once("local/Site.HtpassForm.php");
>  include_once("scripts/authuser.php");
> =================================
>
> And these lines in 'Site.HtpassForm.php':
> =================================\\
> <?php if (!defined('PmWiki')) exit();
> # Password forms
>  $EnableHtpassword = 1;
>  $EnableHtgroup = 1;
>  $HtpasswordNewUsers = 0;
>  $HtpasswordAutoLogin = 0;
>  $HtpasswordDefaultGroup = '@User';
>
>  include_once("cookbook/htpasswdform.php");
> =================================
>
> I can add new user, rename or delete it, and I can login
> as the new user. The wiki can see me. I use
>
> " (:if [ auth edit || authid ]:) {$AuthId}(:ifend:) "
>
> to welcome the login user in the HomePage. It looks great
> with only one problem:
>
> The user I add do not get any 'edit' right. They can login
> but they cannot edit.
>
> What did I do wrong? Can you help me out?
>

The $HtpasswordDefaultGroup configuration parameter is only meaningful
when using both .htpasswd AND .htgroup files: in this case, when a new
user is added into the .htpasswd file, he's also registered as a user
of the specified group in a related .htgroup file.
In your configuration, you seemed to forget to specify the group
definition file.

You should try with an extra line like:

 $AuthUser['htgroup'] = 'local/user/.htgroup';

You should therefore be able to edit this file, to define there the
'User' group and reference your users into it.

-- 
Dominique



More information about the pmwiki-users mailing list