Please note I would like to change the password for all users. The reason is I am setting up a training server. I want to use a command something like:
UPDATE USERS SET password = ‘hashcode of pwd’ WHERE username <> ‘admin’
Please let me know how to generate the encrypted password to use in the above command.
the simplest way to do this is to use the UI/API to change the password of a user, and copy the hashed string from the database directly.
Alternatively, you could update your SQL query to set the password based on the record of the user you changed the password for.
Out of curiosity, i just tested this for me & it works! Thanks @Stian and @jaime.bosque But for me it required a restart though
Also tried one code snippet to generate hash password which somebody had shared before on this forum. It works too but this is more complicated. Whatever Stian and Jaime suggested is so cool.