Questions about changing the harbor user password to a fixed value
I looked at the information about the test user and got the salt value
registry=# select * from harbor_user where username='test';
-[ RECORD 1 ]----+---------------------------------
user_id | 5
username | test
email | [email protected]
password | 73c64d8db1d03e6b94cecc1fc3e9f1fe
realname | test
comment |
deleted | f
reset_uuid |
salt | QLFb3LbuIO6I8q7ou92LFH450GZTdPfC
sysadmin_flag | f
creation_time | 2024-09-29 07:15:46.561826
update_time | 2024-09-29 07:15:46.561828
password_version | sha256
Now I want to change the password of the test user to the specified value, but this does not work What kind of password encryption should I use? md5sum sha256?
echo -n 'www.google.comQLFb3LbuIO6I8q7ou92LFH450GZTdPfC' | md5sum | awk '{ print $1 }'
733a9e49f1f5177d2bdf8115dbdaf426
update harbor_user set salt='QLFb3LbuIO6I8q7ou92LFH450GZTdPfC', password='733a9e49f1f5177d2bdf8115dbdaf426' where username = 'test';
Why are you updating the password directly through the database instead of using the Harbor API?
Forget the password of user admin, so you need to change it in the database
Please refer to this wiki https://github.com/goharbor/harbor/wiki/Harbor-FAQs#authentication for reset admin password. Then change the normal user password via api/ui
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.