[opencms-dev] Changing Admin user password
Kellen Dye
kdye at library.ucsd.edu
Wed Oct 27 23:23:33 CEST 2004
Upon initial installation, OpenCMS suggests that one change the Admin password.
When one goes to Administration > Edit Users > Select "Admin", click "Edit"
and just enters a new password, an error is thrown:
org.opencms.main.CmsException: user data missing
Which comes from:
CmsAdminUsers.java:446
Which is:
if(email.equals("") || userLastname.equals("") || user.equals("")) {
throw new CmsException("user data missing", CmsException.C_NO_USER); }
Which is somewhat silly since there is no default lastname or email for the admin. I suggest either the lastname or email not be required, or a default one for the admin be supplied.
Also better error messages (distinct ones for each of email, lastname, and usernmae) should exist so that a user entering info here can figure out what they did wrong.
Next, once I have supplied a lastname and email, I see two password fields: "Password" and "Confirm Password". This setup makes me assume that I am entering in the _new_ password in both fields, which I do and get:
org.opencms.main.CmsException: [org.opencms.db.CmsDriverManager] Error resetting password for user 'Admin'
Looking at the code at:
CmsDriverManager.java:6707
I see that this actually wants the first password to be the _old_ password and the new password to be entered into "Confirm Password".
This is very confusing. It seems like the "change password" area should be redesigned (relabeled at least). A good setup might be:
Old Password: ______
New Password: ______
Confirm New Password: _____
I have attatched a patch to give more descriptive error messages for the user data problem. It defines a new error code, C_USER_DATA. I also added two error code descriptions which were absent for C_GROUP_ALREADY_EXISTS and C_USER_ALREADY_EXISTS.
Should I open a bug report to submit this patch, or is over the list okay?
Kellen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041027/97a95db1/attachment.txt>
More information about the opencms-dev
mailing list