Skip to content

Commit

Permalink
update basic auth
Browse files Browse the repository at this point in the history
  • Loading branch information
clemenko committed Jan 15, 2021
1 parent dd3d72c commit ef26146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basic_pki_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
## basic

```bash
#preserve the current admin password
# preserve the current admin password
kubectl exec -it $(kubectl get pod -n stackrox|grep central|awk '{print $1}') -n stackrox -- /bin/cat /run/secrets/stackrox.io/htpasswd/htpasswd > htpasswd

#add user to the new file
# add user to the new file aka change user2 to the desired username
htpasswd -B htpasswd user2

#delete the old secret
# delete the old secret
kubectl -n stackrox delete secret central-htpasswd

#add the new secret
# add the new secret file
kubectl -n stackrox create secret generic central-htpasswd --from-file=htpasswd=htpasswd
```

Expand Down

0 comments on commit ef26146

Please sign in to comment.