SID-02013: Porting users accounts after update from 4.0.2 to 6.0.1
| Status: |
Answered |
TWiki version: |
6.0.1 |
Perl version: |
Perl 5.18.2 |
| Category: |
CategoryAuthentication |
Server OS: |
Ubuntu Server 14.04 |
Last update: |
10 years ago |
I installed the 6.0.1 version and, after to have copied the pages from old installation I'm porting the users.
My settongs are:
$TWiki::cfg{LoginManager} = 'TWiki::LoginManager::TemplateLogin';
$TWiki::cfg{TwoStepAuthManager} = 'none';
$TWiki::cfg{TemplateLogin}{PreventBrowserRememberingPassword} = 0;
$TWiki::cfg{LoginNameFilterIn} = '^[^\\s\\*?~^\\$@%`"\'&;\\\|<>\\x00-\\x1f]+$';
$TWiki::cfg{DefaultUserLogin} = 'guest';
$TWiki::cfg{DefaultUserWikiName} = 'TWikiGuest';
$TWiki::cfg{AdminUserLogin} = 'admin';
$TWiki::cfg{AdminUserWikiName} = 'TWikiAdminUser';
$TWiki::cfg{SuperAdminGroup} = 'TWikiAdminGroup';
$TWiki::cfg{Access}{AdminDomain} = 'site';
$TWiki::cfg{UsersTopicName} = 'TWikiUsers';
$TWiki::cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth,rest,mdrepo';
$TWiki::cfg{AuthRealm} = 'Enter your
LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. JohnSmith, unless you chose otherwise). Visit
TWikiRegistration if you do not have one.';
$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$TWiki::cfg{Register}{EnableNewUserRegistration} = 1;
$TWiki::cfg{Register}{HidePasswd} = 1;
$TWiki::cfg{Register}{AllowSystemGeneratedPassword} = 1;
$TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';
$TWiki::cfg{MinPasswordLength} = 5;
$TWiki::cfg{MustChangePasswordAfterReset} = 1;
$TWiki::cfg{Htpasswd}{FileName} = '/var/www/twiki/data/.htpasswd';
$TWiki::cfg{Htpasswd}{Encoding} = 'md5';
$TWiki::cfg{CryptToken}{Enable} = 1;
$TWiki::cfg{CryptToken}{SecureActions} = 'register,save,comment,createweb,upload';
$TWiki::cfg{OS} = 'UNIX';
$TWiki::cfg{DetailedOS} = 'linux';
$TWiki::cfg{DenyDotDotInclude} = 1;
$TWiki::cfg{AllowInlineScript} = 1;
I copied the old .htpasswd file but:
- when I try to register a new user I get:
"There has been a problem adding your user id to the Password system."
- when I try to reset a user password I get:
Can't get an e-mail address for
DanieleBarzo (required for password reset)"
Also all the lines in the twiki/data/.htpasswd file are changed as:
[UseName]:Enter your
LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. JohnSmith, unless you chose otherwise). Visit
TWikiRegistration if you do not have one.:[UserMail]::0:0
Where [UserName] and [UserMail] are respectively the user name and mail.
Any idea?
--
Daniele Barzotti - 2015-01-21
Discussion and Answer
Found the mistake.
The Encoding was wrong.
Changing:
$TWiki::cfg{Htpasswd}{Encoding} = 'md5';
to
$TWiki::cfg{Htpasswd}{Encoding} = 'crypt';
make it work.
--
Daniele Barzotti - 2015-01-21
I am glad it worked out. Thanks for sharing the fix with the community.
--
Peter Thoeny - 2015-01-21
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.