From ef26146c5d9ef2dc884255e782baaa327ccbe927 Mon Sep 17 00:00:00 2001 From: Andy Clemenko Date: Fri, 15 Jan 2021 11:59:13 -0500 Subject: [PATCH] update basic auth --- basic_pki_auth.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basic_pki_auth.md b/basic_pki_auth.md index c501dd1..e473b4a 100644 --- a/basic_pki_auth.md +++ b/basic_pki_auth.md @@ -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 ```