1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/identity-provider-creating-htpasswd-file-linux.adoc
2023-10-30 10:13:25 -04:00

48 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * authentication/identity_providers/configuring-htpasswd-identity-provider.adoc
:_mod-docs-content-type: PROCEDURE
[id="identity-provider-creating-htpasswd-file-linux_{context}"]
= Creating an htpasswd file using Linux
To use the htpasswd identity provider, you must generate a flat file that
contains the user names and passwords for your cluster by using
link:http://httpd.apache.org/docs/2.4/programs/htpasswd.html[`htpasswd`].
.Prerequisites
* Have access to the `htpasswd` utility. On Red Hat Enterprise Linux
this is available by installing the `httpd-tools` package.
.Procedure
. Create or update your flat file with a user name and hashed password:
+
[source,terminal]
----
$ htpasswd -c -B -b </path/to/users.htpasswd> <username> <password>
----
+
The command generates a hashed version of the password.
+
For example:
+
[source,terminal]
----
$ htpasswd -c -B -b users.htpasswd <username> <password>
----
+
.Example output
[source,terminal]
----
Adding password for user user1
----
. Continue to add or update credentials to the file:
+
[source,terminal]
----
$ htpasswd -B -b </path/to/users.htpasswd> <user_name> <password>
----