-1

So I freshly installed kali linux and logged into the root user to create a user called gyrgamfor personal use. The first command I typed was createuser gyrgam, which gave me this output

createuser: error: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

I searched for a solution to this here on stack, but I only managed to find how to start the postgresql service with systemctl start postgresql.service. Now after trying createuser gyrgam again, it now gives me this error:

createuser: error: could not connect to database postgres: FATAL:  role "root" does not exist

I even did reinstall whole linux, to solve this. Before the reinstall, I of course had the same problem and I tried solutions like here or here but they either didn't work for me or gave me other errors.

My goal is to create an user called gyrgam. But as explained, I get some postgres database error.

gyrgam
  • 1
  • 2

1 Answers1

0

It seems that you are executing wrong command. If I understood correctly you want to create OS user in linux. While createuser command is supposed to create user in postgres database. To create OS user in linux you should use adduser command. See this link for reference https://kali.training/topic/managing-users-and-groups/

Vladimir
  • 615
  • 5
  • 12