Appendix A. Sample lab: Deployment and Pod management 201
A.2  Creating a user and project by using the OpenShift 
command line
Complete the following steps:
1. Add a user called user1 with password cloudonpower, as shown in Example A-3.
Example A-3   Adding a user
$ sudo adduser user1
$ echo “cloudonpower” | sudo passwd user1 --stdin
2. Run the htpasswd command to update the flat files that are used to store user names and 
passwords for basic authentication of HTTP users. Use user user1 with password 
cloudonpower, as shown in Example A-4.
Example A-4   Updating password for an HTTP user
$ sudo htpasswd -b /etc/origin/master/htpasswd user1 cloudonpower
Adding password for user user1
3. Assign the new user cluster administration ri ghts by logging in as cluster administrator 
(root privileges) into the default project by using the OpenShift CLI command (oc), as 
shown in Example A-5. 
Example A-5   Logging in to the default project
$ oc login -u user615 -n default
Server [https://localhost:8443]:
The server is using a certificate that does not match its hostname: x509: 
certificate is valid for kubernetes, kubernetes.default, 
kubernetes.default.svc, kubernetes.default.svc.cluster.local, openshift, 
openshift.default, openshift.default.svc, openshift.default.svc.cluster.local, 
p615-kvm1.cecc.ihost.com, 129.40.252.236, 172.30.0.1, not localhost
You can bypass the certificate check, but any data you send to the server could 
be intercepted by others.
Use insecure connections? (y/n): y
Authentication required for https://localhost:8443 (openshift)
Username: user615
Password: *********
Login successful.
You have access to the following projects and can switch between them with 'oc 
project <projectname>':
  * default
    kube-public
    kube-service-catalog
    kube-system
    management-infra
    openshift
    openshift-ansible-service-broker
    openshift-console
    openshift-infra
    openshift-logging
    openshift-monitoring