// Module included in the following assemblies:
//
// assembly-getting-started.adoc
// assembly-getting-started-rh.adoc
// assembly-managing-users.adoc

[id='proc-creating-users-cli-{context}']
= Creating users using the command line

In {ProductName} users can be created using standard command-line tools.

.Prerequisites

ifdef::Prereqs[]
* You must have already created an link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#create-address-space-cli-messaging-gs[address space].
endif::Prereqs[]

ifndef::Prereqs[]
* You must have already created an link:{BookUrlBase}{BaseProductVersion}{BookNameUrl}#create-address-space-cli-messaging[address space].
endif::Prereqs[]

.Procedure

. To correctly base64 encode a password for the user definition file, run the following command:
+
[options="nowrap",subs="attributes,+quotes"]
----
echo -n password | base64 #cGFzc3dvcmQ=
----
+
NOTE: Be sure to use the `-n` parameter when running this command. Not specifying that parameter will result in an improperly coded password and cause log-in issues.

. Save the user definition to a file:
+
[source,yaml,options="nowrap"]
----
include::../common/user-example1.yaml[]
----

. Create the user and associated user permissions:
+
[options="nowrap",subs="attributes,+quotes"]
----
{cmdcli} create -f __user-example1.yaml__
----

. Confirm that the user was created:
+
[options="nowrap",subs="attributes,+quotes"]
----
{cmdcli} get messagingusers
----


