Here is a sequence of commands you can use to reset and add a new user to the OpenShift htpasswd.
oc extract secret/htpasswd-fp844 -n openshift-config --to=- > users.htpasswd
# Reset password in htpasswd
htpasswd -B -b users.htpasswd admin <new-password>
# You can also add new user
htpasswd -B -b users.htpasswd <new-user> <password>
oc create secret generic htpasswd-fp844 -n openshift-config --from-file=htpasswd=./users.htpasswd --dry-run -o yaml | oc replace -f -
Top comments (0)