[pmwiki-users] InitialPasswords

Peter & Melodye Bowers pbowers at pobox.com
Wed Apr 30 15:48:21 CDT 2008

>How can I set a complete site back to "Initial passwords" as they are at
installation time.
>That is: clear all special passwords related to pages, groups, etc. that
have been added by different users.
To get rid of page-specific passwords you've got to get rid of lines in any
page-file (wiki.d/MyGroup.MyPage) that start with "passwd" -- i.e.,
passwdedit=encryptedvalue, passwdread=encryptedvalue, etc.
(I just tried this on a test page and it successfully got rid of the
password -- whether it has other undesired side effects I don't know.)
If you are on a linux-based host you could do it on the command line like
$ cd wiki.d
$ grep -l '^passwd' * | xargs sed -i '/^passwd/d'
or, if you don't have command line you could do the same sort of thing with
WikiSh in the Control Panel:
grep -l '^passwd' TEXTFILE--wiki.d/* | while read fn
   grep -v '^passwd' TEXTFILE--${fn} >TEXTFILE--${fn}
Either of these are kind of "big" and non-standard automatic edits, so
obviously appropriate care should be taken in backups and etc. ahead of time
and validating the change before accepting it straight-out.
It would be safer to simply use grep to identify which pages have a
page-specific password and then go in and manually remove them...  This
could be done with this MX on any page:
{(grep -l '^passwd' TEXTFILE--wiki.d/*)}
If your site is too large to process in one fell swoop you may need to break
it down into groups or something in the wildcard specification.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080430/359af539/attachment.html 

More information about the pmwiki-users mailing list