[pmwiki-users] Always logged in for my IP (no password requested) : how to ?

ABClf languefrancaise at gmail.com
Fri Sep 7 07:14:32 CDT 2012

Hello !

I would like to avoid password step when working on my wiki at home ;
how can I do ?

I know these cookbooks :
PersistentLogin ; AuthDNS
but I would like something just easy, as mentioned in PmWiki/Security (1):

How do I take a whitelist approach where users from known or trusted
IP addresses can edit, and others require a password?

Put these lines to local/config.php:
## Allow passwordless editing from own turf, pass for others.
if ($action=='edit'
 && !preg_match("/^90\\.68\\./", $_SERVER['REMOTE_ADDR']) )
 { $DefaultPasswords['edit'] = crypt('foobar'); }
Replace 90.68. with the preferred network prefix and foobar with the
default password for others.

As for now, in my config, I have (2) :

$DefaultPasswords['admin'] = crypt('xxx');
$DefaultPasswords['attr'] = crypt('xxx');
$DefaultPasswords['edit'] = crypt('yyy');

I would like mix (1) & (2), but not sure how to do, nor what order...

I tried to use AuthDNS cookbook but still dont have found how to do :
what should i write in SiteAdmin.AuthDNS to have no password for my ip ?

This doesnt work (my mistake, for sure, but havent found the good way
; --fake ip here--) :
 # IP addresses and ranges id:gb @admin

Thank you ;)



| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com

More information about the pmwiki-users mailing list