For the components of the identity service to work, you need to configure the connection to the PostgreSQL databases and manually create the databases that will store information about LDAP users and groups in PostgreSQL. For more information on managing databases, please refer to documentation on the official PostgreSQL website.
To configure PostgreSQL databases:
sudo apt install postgresql -y
/etc/parsec
directory, open the mswitch.conf
file for editing and change the value of the zero_if_notfound
parameter to yes
to connect to the databases.sudo systemctl restart postgresql
sudo -u postgres psql
CREATE USER uaws WITH PASSWORD '<
password
>';
usermpp
by running the following query:CREATE DATABASE usermap;
uaws
user permissions to manage the usermap
database:ALTER DATABASE usermap OWNER TO uaws;
usermap
database by running the following query:\c usermap;
usermap
database, create a table named log_events
for user event logging by running the following query:CREATE TABLE log_events (id SERIAL PRIMARY KEY, userName VARCHAR(255) NOT NULL, domain VARCHAR(255) NOT NULL, ipAddress VARCHAR(15) NOT NULL, addTime TIMESTAMP NOT NULL, updateTime TIMESTAMP, expiryTime TIMESTAMP, status VARCHAR(16) NOT NULL, receivedTime TIMESTAMP, UNIQUE (userName, domain, ipAddress));
uaws
user permissions to manage the log_events
table:ALTER DATABASE public.log_events OWNER TO uaws;
groupapp
by running the following query:CREATE DATABASE groupapp;
uaws
user permissions to manage the groupapp
database:ALTER DATABASE groupapp OWNER TO uaws;
groupapp
database by running the following query:\c groupapp;
groupapp
database, do the following:groups
for information about LDAP user groups by running the following query:CREATE TABLE groups(id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, dn VARCHAR(255), status VARCHAR(15) NOT NULL, lastRequestTime TIMESTAMP NOT NULL, updatedTime TIMESTAMP, createdTime TIMESTAMP, deletedTime TIMESTAMP);
users
for information about LDAP users by running the following query:CREATE TABLE users(id SERIAL PRIMARY KEY, username VARCHAR(255) NOT NULL, samaccountname VARCHAR(255) NOT NULL, groupId INTEGER, status VARCHAR(15) NOT NULL, updatedTime TIMESTAMP, createdTime TIMESTAMP, deletedTime TIMESTAMP);
uaws
user permissions to manage the groups
table:ALTER TABLE public.groups OWNER TO uaws;
uaws
user permissions to manage the users
table:ALTER TABLE public.users OWNER TO uaws;
\q
The databases are prepared and can be used by the components of the user identity service.
Page top