From 53179981d62b1f05951ed70031e5497dbb9dc50c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 18 Dec 2014 15:37:08 +0100 Subject: [PATCH] doc: Add section 'Database Setup' to authentication.md fixes #7672 --- doc/authentication.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/authentication.md b/doc/authentication.md index a4fdc2fcc..d36051e8f 100644 --- a/doc/authentication.md +++ b/doc/authentication.md @@ -85,13 +85,31 @@ Directive | Description ``` [auth_ad] backend = ad -resource = my_db +resource = icingaweb-mysql ``` +#### Database Setup + +For authenticating against a database, you have to import one of the following database schemas: + +* **etc/schema/preferences.mysql.sql** (for **MySQL** database) +* **etc/schema/preferences.pgsql.sql** (for **PostgreSQL** databases) + +After that you have to define the [database resource](#resources-configuration-database). + **Manually Creating Users** +Icinga Web 2 uses the MD5 based BSD password algorithm. For generating a password hash, please use the following +command: + ```` openssl passwd -1 "password" +```` +> Note: The switch to `openssl passwd` is the **number one** (`-1`) for using the MD5 based BSD password algorithm. + +Insert the user into the database using the generated password hash: + +```` INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('icingaadmin', 1, 'hash from openssl'); ````