0
I'm am attempting to reinstall PostgreSQL as I am unable to log into it at all. I realise I had installed it a long time ago using both the installer from the postgres website and brew install postgres
. I have uninstalled both of these now:
- uninstalled using
brew uninstall --force postgresql
to remove all versions installed via brew. - uninstalled using
sudo /Library/PostgreSQL/9.5/uninstall-postgresql.app/Contents/MacOS/installbuilder.sh
- manually removed
/Library/PostgreSQL
(rm -rf /Library/PostgreSQL
) - manually the PostgreSQL user (via the Mac
Users & Groups
).
However I have a _postgres
user left in /etc/passwd
:
$ grep post /etc/passwd
_postgres:*:216:216:PostgreSQL Server:/var/empty:/usr/bin/false
There are no userdel
or usermod
commands available on Mac (10.11 El Capitan) and the alternative seems excessively complex (but perhaps necessarily so?)
thanks for the help. I have edited answer to make it clear I have already run this command – AJP – 2017-05-18T20:27:23.233
1Oh - well, perhaps then reading the install/uninstall scripts will not be helpful. – user2497 – 2017-05-18T20:28:15.480
1I once messed around in the guts of OSX, assuming a normal passwd/group configuration. Even then it was a filthy experience. Jobs certainly made FreeBSD weirder. – user2497 – 2017-05-18T20:34:13.967
Wow... that is intimidating. Thank you very much for your answer. Playing whack-a-mole with postgres has at some point resulted in success. When I reinstall with brew and ran
createdb \
whoami`` I can now login to a psql shell successfully :) Thank you very much for the detailed answer. I'm going to mark this as correct though I haven't summoned the courage to try it! – AJP – 2017-05-18T20:38:11.6101It is prudent to perform a backup. I am not sure why they got rid of the classical passwd/group system, but it is certainly possible regardless of this obfuscation. When I went cavediving in OSX, I was also removing a user account that wouldn't be removed with conventional weapons, but that was long ago. – user2497 – 2017-05-18T20:44:45.467
1IIRC, on a multivolume setup, if you have your Users folder on another disk, you must invoke
mount -uwa
– user2497 – 2017-05-18T20:46:39.120