ACPI administration advocacy advocacy advocacy opinion alsa amarok apache apple apt aptitude archive audio audo authentication automount avi awk backup bash BIOS boot browser business bzip cache calendar calibre cdr cdrecord censorship commandline computerscience console convert cron cut database date debian degree design desktop development disk dpkg dvd economics education emacs email europe exim faad ffmpeg file files firefox firewall flash foss freedom ftp fun fuse git gnumeric graphics grep growisofs grub gtkpod gzip hardware hardware html icedove idiocy image imagemagick images installation ip iphone ipod iptables iso itunes ivman kde kernel keyboard knoppix lame laptop latex libreoffice linux locale lockin locking longlines lsof m4a microsoft mimetypes minitab mogrify mount mp3 mp4 mplayer multimedia music mysql network nfs nfs4 nmap openbox openfiles openoffice opinion opinion orgmode partition pdf pdftk perl php podcast politics pomodoro ports postgresql print printing privacy process programming rant remote rhythmbox rss rsync rxvt scp screengrab screenshot script scripting scsi security sed server services shell siteadmin sitenews sitesoftware skype skype slackware sound sox spam spreadsheet ssh statistics subversion sudo svk swap t23 t43 tar terminal tex text thinkpad thunderbird time timer timezone ubuntu udev upgrade usb usbmount users uuid versioncontrol vfat video vnc windows wine wordpress wordprocessing X40 xwindows xwindows youtube
I don't administer postgresql very often. Normally, I use it as a back-end to something, so I often forget how to do some of the most basic things, like ... er... login.
Consider a recent experience. I tried to login:
FATAL: role "paul" does not exist
So, I try to create 'paul' using createuser, but I can't until, I realise that I can create users if I su as user postgres. Again I try to log in:
FATAL: Ident authentication failed for user "paul"
This is really annoying, but it's supposed to be an aid to security. Postgres is installed in such a way that you can only log in with the same user name as your Linux account. A line in pg_hba.conf does this:
local all all ident sameuser
One way to fix the problem is to amend that line. The other is not to connect through a Unix socket rather through an IP address. So, whereas this will fail to login to the database mydb:
psql -U dbuser mydb
This will succeed:
psql -U dbuser -h 127.0.0.1 mydb