-> After the installation of postgresql we need to create the user account for the postgresql.
-> For this login as root and then execute the cmd below.
cmd:adduser postgres
create user account
-> Now the user is added and now the prompt is at created user.

To add the created user to sudo userslist:
-> We can not directly execute the sudo by simply creating the user an error will be come like this.
error for sudo user
-> Then execute the cmd below in the root login.
cmd: sudo usermod -aG sudo,adm postgres_user
-> Now the user is added to the sudo users list.to add as sudo user

To give privilliges to the particular folder:
cmd:mkdir /DB/test/

-> While creating the directory if the error comes as below
permission_denied
-> Then give the privilliges to the particular folder using the cmd
cmd:sudo chown postgres_user:postgres_user /DB/

mkdir
-> Now we can able to create the folder.
cmd:mkdir /DB/test/

To change the password of the user:
-> Login as the user for which the password needs to be changed.
-> Then use the cmd and give the old password and then new password.
cmd: passwd postgres_user

to change the user password
-> Now we can see the password is changes successfully.

To remove the user
cmd:deluser postgres2
remove_user