Feedback
latest
Create user¶
Introduction¶
This part of the documentation sheds some light on the topics of User management and Privileges.
CrateDB ships with a superuser account called “crate
”, which has the
privileges to perform any action. However, with the default configuration, this
superuser can only access CrateDB from the local machine CrateDB has been
installed on. If you are trying to connect from another machine, you are
prompted to enter a username and password.
In order to create a user that can be used to authenticate from a remote
machine, first install crash or other
CrateDB Clients and Tools on the same machine you installed CrateDB on.
Then, connect to CrateDB running on localhost
.
While you can also perform the steps outlined below within The CrateDB Admin UI itself, the walkthrough will outline how to do it using the The CrateDB Shell on the command line.
Details¶
Invoke Crash within the terminal of your choice.
sh$ crash
Add your first user with a secure password to the database:
cr> CREATE USER username WITH (password = 'a_secret_password');
Grant all privileges to the newly created user:
cr> GRANT ALL PRIVILEGES TO username;

Now try navigating to the The CrateDB Admin UI in your browser. In the URL
below, please replace cratedb.example.org
with the host name or IP address
of the machine CreateDB is running on and sign in with your newly created user
account:
http://cratedb.example.org:4200/
You should see something like this:

After creating the user and granting all privileges, you should be able to continue with the guided tour connecting to CrateDB from a remote machine.