How to create a new user in OpenShift?

Viewed 17423

I am trying to find out how to create a new user in OpenShift enterprise.

According to the documentation (on https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/projects_and_users.html):

Regular users are created automatically in the system upon first login...

This sounds illogical. How does a user login if they dont have a username and password?

Can someone please clarify this - I'm sure there must be some command for creating a new user, but it is not clear.

Thanks

2 Answers

I am creating a script for simply adding a user if OpenShift using HTPasswdPasswordIdentityProvider

wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
mv jq-linux64 jq && chmod 755 jq

FILE=$(cat /etc/origin/master/master-config.yaml | python -c 'import sys, yaml, json; y=yaml.load(sys.stdin.read()); print json.dumps(y,indent=4, sort_keys=True)' | ./jq '.oauthConfig.identityProviders[0].provider.file')
FILE=$(sed -e 's/^"//' -e 's/"$//' <<<"$FILE")

htpasswd $FILE user1
Related