I have some data I found on the Office for National Statistics (UK) website which I'm trying to port from a csv file into a PostgreSQL database to perform queries, data manipulations and create visualisations. I'm using a program I found called pgfutter to try to make this process simpler (I anticipate having to do this a number of times for different csv data).
However, as I've tried to run the
pgfutter program when logged in as root or from my user directory (
./pgfutter csv downloadedfile.csv) I've gotten this error:
pq: password authentication failed for user "postgres"
Ok, I thought, so I switched to the postgres user account, and made sure to enable postgres in the sudoers file. When running as the postgres user the command failed with the same error, and there was no option given to input a password for the postgres user.
So... I dropped into the postgres user account and instead ran
sudo ./pgfutter csv downloadedfile.csv from there. This at least prompted for a password, but resulted in this error:
postgres is not in the sudoers file. This incident will be reported.
So, I dropped back into root and opened up
/etc/sudoers and edited in this line:
username ALL=(ALL) ALL
Which resulted in the same error. I even tried changing this to:
%username ALL=(ALL) ALL
Which results in the same error.
I was under the understanding that adding
username ALL=(ALL) ALL to the sudoers file would allow all users access to
sudo (I also have the
%sudo ALL=(ALL:ALL) ALL in the sudoers file) but this does not appear to be the case at present.
How do I give the postgres user
sudo permissions and hence allow the program to correctly execute and port the data over to my database?