diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-04 17:27:48 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-04 17:27:48 -0400 |
commit | 8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a (patch) | |
tree | 9e26465e0ca98a5f3cbc6c72a0cace4bf83b93db /doc/tips/inside_dot_ikiwiki | |
parent | 78a69e5bd632eb86ef8135e9c1d05d2c48b43362 (diff) | |
parent | 08fda4c9d374de1d3de3172a192d4d915d3dc0c1 (diff) |
Merge branch 'master'
Conflicts:
doc/ikiwiki-makerepo.mdwn
Diffstat (limited to 'doc/tips/inside_dot_ikiwiki')
-rw-r--r-- | doc/tips/inside_dot_ikiwiki/discussion.mdwn | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn index c05e7a3e0..34d5b9252 100644 --- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn +++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn @@ -16,3 +16,50 @@ No idea how this happened. I've blown it away and recreated it but, for future >>> --getctime does. --[[Joey]] >> Alas, I seem to have lost the bad index file to periodic /tmp wiping; I'll send it to you if it happens again. --[[sabr]] + +<!-- Add by Blanko --> + +## Lost password for an user + +This morning, a person has lost its password. I was able to do something to make another password. This is the way I take : + +> You can certianly do that, but do note that ikiwiki will offer to mail a +> user a password reset link if they lost their password. --[[Joey]] + +### Locate the user database + +As tips show us, the user database is in the source file, for an example : + + src/.ikiwiki/userdb + +### See which user to modify + +Because I don't know the real login of the user, I have to read all the database : + + perl -le 'use Storable; my $index=Storable::retrieve("userdb"); use Data::Dumper; print Dumper $index' + +Then I was able to find this : + + 'Utilisateur' => { + 'email' => 'user@pl.fr', + 'cryptresettoken' => '$2a$10$cfVeOoVbFw9VzMlgEbPMsu34pwHIFP84mWlkrs2RCKknZYPZkPffm', + 'password' => '', + 'resettoken' => '', + 'cryptpassword' => '$2a$10$H8bYq.dlb68wpnfJgVZQhOdsF9JQ06cteRfhPQPB5eHKnD5Y3u7au', + 'regdate' => '1226574052' + }, + +Let's have a look to modify lines. + +### Modify the line + +When you have found the line to modify, take the user name, and change its password to **sc** (for an example) : + + perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); $userinfo->{"Utilisateur"}->{cryptpassword}=q{$2a$10$7viOHCrUkdAVL135Kr6one1mpZQ/FWYC773G1yZ0EtQciI11sSDRS}; Storable::lock_nstore($userinfo, "userdb")' + perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); $userinfo->{"Utilisateur"}->{cryptresettoken}=q{}; Storable::lock_nstore($userinfo, "userdb")' + +Because I don't know how suppress cryptresettoken and resettoken fields, I change their content with *null*. + +After all these modifications, the user *Utilisateur* could connect to its account with the password **sc**, and go to Preferences, then change its password. + +<!-- End of Blanko's modifications --> |