Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYzS4-0002Fz-FE for pgsql-general@arkaria.postgresql.org; Tue, 09 Jan 2018 19:20:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYzS3-0000lg-Ia for pgsql-general@arkaria.postgresql.org; Tue, 09 Jan 2018 19:20:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eYzS3-0000lW-Ab for pgsql-general@lists.postgresql.org; Tue, 09 Jan 2018 19:20:47 +0000 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eYzS0-0001be-0U for pgsql-general@postgresql.org; Tue, 09 Jan 2018 19:20:46 +0000 Received: by mail-lf0-x229.google.com with SMTP id h140so17154196lfg.1 for ; Tue, 09 Jan 2018 11:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=bi5Kp7sfs3sp13HiadWmC4gXolh/06Vl0T6SjwpzgUE=; b=fkh23z8uW5I2Fa3j3pntah40Ooxa25oGm+VL1Dg6xWezzIK2W/ygKysCzZIicMmTf7 wwtYn6kHgCAzRuAuw7NLhlkDKnn0OoJtWiQtLOEQlUBmhZXcvM6cRL+K/po5VlUoEZ18 tBdAAzGOYl8DNIlsMAgtI0ACSLO1dGZlL8H4BMXBUuqPM6pNUZQIeA3zewI7vMeqDh6b jez/ua7Q1d31eisjLTuKv6IIlG21OsT2F5WV01t6ZDw1gi7kFajoIWek2ZoWO/J/o/rt q5luNja8NbYwYwEGE/9vM5xutnNN+3pww2XE7ylFg1DRlFXf2no6SqBfoqBtVhoCcruA YZiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=bi5Kp7sfs3sp13HiadWmC4gXolh/06Vl0T6SjwpzgUE=; b=DVq41p2Yl/zhkMmE4LCMemMZP2L1pEoJl5gxagxpTA2Z8Fn6WrzXMRgZuuV0VAwVZK szQ9dkJIpiRWX8NQN/S0c0VlmRneNxQHt/ObgQdS5g9oKK/kug3znenOyDeY6KLLfbZO HmkugRn43waSE7xDLxIyktxqOWKjeZUgLOmk/9QDvTNOlAxWfUWAaVbL8SEeilv1+U4C HKvYYGx+BYmXB4oNSxl1TjEN8Q8IvtateaXtfsIzb3ScfXqHUxSa12zSjwjQ0rrUiyST 4sUkRDftu62RCl14bkrtQJqcQJeP3rYdBj2OmYhoDsoAPlX2Sw+IAIbi2wOJJn4VqgX0 vU5A== X-Gm-Message-State: AKGB3mJ/EHaYfEvKK9Y+CpzQ/fkUreuNFwZYPSYi1thhkT57cQZDY8PQ /ekVF/SLFY3cqS4Wvsw1FO8LbYJD X-Google-Smtp-Source: ACJfBovEk82+G0l5AM8MsRc5LMKc1hZHs6RGbddS9vpCkbEWRLKlbLclA40gl4nDZE0LfBer8VF0Jg== X-Received: by 10.46.91.19 with SMTP id p19mr9568043ljb.52.1515525642173; Tue, 09 Jan 2018 11:20:42 -0800 (PST) Received: from McAgnar.local (248.120.164.82.customer.cdi.no. [82.164.120.248]) by smtp.gmail.com with ESMTPSA id u23sm2993795lje.79.2018.01.09.11.20.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 11:20:41 -0800 (PST) Subject: Re: Getting started with first user. To: Adrian Klaver , pgsql-general@postgresql.org References: <3c81114e-cab6-6abd-de40-ab5ba23006c2@aklaver.com> From: Agnar Renolen Message-ID: Date: Tue, 9 Jan 2018 20:20:40 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <3c81114e-cab6-6abd-de40-ab5ba23006c2@aklaver.com> Content-Type: multipart/alternative; boundary="------------AAA8CD666F48D308DFD2FA5B" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------AAA8CD666F48D308DFD2FA5B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Found out a way out. Logged in as *root*, and created a password for the *postgres* user. Then logged in as *postgres* and and ran "createuser -s me". Then logging in as *me*, ran "createdb" Agnar On 09/01/2018 17:13, Adrian Klaver wrote: > On 01/09/2018 01:48 AM, Agnar Renolen wrote: >> I have just installed PostGIS (Postgres9.6) on a Debian server using >> apt-get. >> >> But I have problems doing anything: >> >> I installed as root, but trying doing things as my local user "me" >> >> me> createuser me >> createuser: could not connect to database postgres: FATAL: role "me" >> does not exist >> >> Then, trying the same as root, but gettinge the same result. >> >> root> createuser me >> createuser: could not connect to database postgres: FATAL: role >> "root" does not exist >> >> Then trying with the -U postgres option. >> >> root> createuser -U postgres me >> createuser: could not connect to database postgres: FATAL: Peer >> authentication failed for user "postgres" >> >> How do I get started? > > > https://wiki.debian.org/PostgreSql#User_access > > --------------AAA8CD666F48D308DFD2FA5B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Found out a way out.

Logged in as root, and created a password for the postgres user.

Then logged in as postgres and and ran "createuser -s me".

Then logging in as me, ran "createdb"

Agnar

On 09/01/2018 17:13, Adrian Klaver wrote:
On 01/09/2018 01:48 AM, Agnar Renolen wrote:
I have just installed PostGIS (Postgres9.6) on a Debian server using apt-get.

But I have problems doing anything:

I installed as root, but trying doing things as my local user "me"

me> createuser me
createuser: could not connect to database postgres: FATAL: role "me" does not exist

Then, trying the same as root, but gettinge the same result.

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

Then trying with the -U postgres option.

root> createuser -U postgres me
createuser: could not connect to database postgres: FATAL: Peer authentication failed for user "postgres"

How do I get started?


https://wiki.debian.org/PostgreSql#User_access



--------------AAA8CD666F48D308DFD2FA5B--