distal-attribute
distal-attribute
distal-attribute
distal-attribute

Clone functionality in user manager

User, date Message
Written by blauhut
3 years ago
Category: General
9 posts since Tue, 29 Mar 11
When I clone a user in user manger (r3914, 5.0.15), I would expect to get a user with all the privileges copied from the currently selected user. What I get is a new user with no privileges, so there seems to be no difference to creating a new user.
Is my expectation wrong?
Written by ansgar
3 years ago
5023 posts since Fri, 07 Apr 06
Your expectation is right. And I think that was the case at some point, and I broke that in some recent change, accidentally. Will check.
Written by ansgar
3 years ago
5023 posts since Fri, 07 Apr 06
Fixed in r3917
Written by alfiqmiq
6 months ago
30 posts since Sun, 02 Mar 14
In this case... can You also clone password string? MAny times I need to add acces for one user from different locations.
Written by ansgar
6 months ago
5023 posts since Fri, 07 Apr 06
The "IDENTIFIED BY 'yourpassword'" expects a clear text, non encrypted password. As the hashes are not reversible, it cannot be cloned. Sorry.
Written by alfiqmiq
6 months ago
30 posts since Sun, 02 Mar 14
but when You clone user You can copy an encrypted password after user insert (db: mysql, table: user, column: Password) and then run flush privileges. As I think You can do that becouse I do that manually and works fine.

From that point is my suggestion to improve functionality of this function.
Written by ansgar
6 months ago
5023 posts since Fri, 07 Apr 06
Oh, you're right, you can pass both a plaintext password or a hash:

mysqldocs wrote: To avoid specifying the plaintext password if you know its hash value (the value that PASSWORD() would return for the password), specify the hash value preceded by the keyword PASSWORD:

CREATE USER 'jeffrey'@'localhost'
IDENTIFIED BY PASSWORD '*90E462C37378CED12064BB3388827D2BA3A9B689';

Written by alfiqmiq
6 months ago
30 posts since Sun, 02 Mar 14
Sol can You add this functionality to clone user in user manager ?
Written by alfiqmiq
6 months ago
30 posts since Sun, 02 Mar 14
I think that You can add sth like checkbox "hash/plain text" and depends on it create new account. This would be more universal solution.
Written by ansgar
6 months ago
5023 posts since Fri, 07 Apr 06
We don't even need a checkbox. Hashes begin with a '*' character and always have the same length of 41 characters. When cloning a user, I can just copy the hash to the new user's password, and disable the password char in the password edit boxes.
Written by ansgar
6 months ago
5023 posts since Fri, 07 Apr 06
r4747 overtakes the old username and hashed password when cloning a user.
 

Please login to leave a reply, or register at first.