Greg Artisi
Greg Artisi

Reputation: 172

windows 10 doesnt allow postgres as user name

I'm trying to install PostgreSQL 10 on windows 10. The Postgres installation tutorial tells me to create a new Windows 10 administrator named postgres.

this is the procedure:

  1. Uninstall PostgreSQL and delete the data directory in the installation folder.
  2. Create a new Windows user named postgres and add it to the Administrators group.
  3. Restart your computer.
  4. Open cmd (command prompt) as the postgres command using the following command: runas /user:postgres cmd.exe 5-A new window appears, you need to run the installer file from this window.

But, at point 2, when I try to create a user named postgres, Windows does not accept the user name postgres, does someone knows the solution?

thank you.

enter image description here

Upvotes: 1

Views: 4566

Answers (1)

Greg Artisi
Greg Artisi

Reputation: 172

after some research, i found that i have already a user called postgres in the system as a host, but i cannot SEE it from windows parameters.

I can see it in the cmd using net user, but when I try to delete it, windows tells me I have not the authorisation.

So, i went to Control Panel > System. > Advanced system settings Click the Settings button under the User Profiles sub-section

from here I thought I could delete this user.

But, when I try again to create it, I still can not! net user still shows me this user "postgres"

enter image description here

in the end, I found I had to use the windows PowerShell admin command prompt which is different from the classic command prompt, and from there, it worked!

I used the command net user postgres /delete and this user has been deleted.

now I can reinstall postgresql!

enter image description here

Upvotes: 2

Related Questions