Re: postgres db deleted and recreated... "No directory, logging in with HOME=/" error...

Поиск
Список
Период
Сортировка
От
Тема Re: postgres db deleted and recreated... "No directory, logging in with HOME=/" error...
Дата
Msg-id 20060506192614.36732.qmail@web33307.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: postgres db deleted and recreated... "No directory,  (John Purser <jmpurser@gmail.com>)
Ответы Re: postgres db deleted and recreated... "No directory,  (Devrim GUNDUZ <devrim@commandprompt.com>)
Re: postgres db deleted and recreated... "No directory, logging in with HOME=/" error...  (David <dbree@duo-county.com>)
Список pgsql-novice
> On Sat, 6 May 2006 10:11:55 -0700 (PDT)
> <operationsengineer1@yahoo.com> wrote:
>
> > well, i dropped the "postgres" db in order to
> create a
> > "rails" db.  i tried to do some stuff and i kept
> > getting the error that postgres didn't exist.
> then i
> > remembered that was likely because it was the
> default
> > db required to work with other dbs.
> >
> > ooops!
> >
> > i had created a postgres db earlier, so i thought
> > deleting postgres would only impact what i had
> > previously created (i think postgres already
> existed
> > in the distro, now that i look back).
> >
> > anyway, i recreated postgres, but when i "su -
> > postgres"... i get the following error:
> >
> > No directory, logging in with HOME=/
> >
> > i think i must've deleted a directory when i
> deleted
> > postgres and it wasn't recreated when i recreated
> > postgres.
> >
> > what can i do, if anything, to get back on track
> after
> > delting and recreating the postgres db?  i'm
> running
> > simply mepis, which is based on debian.
> >
> > as always, tia...
> > ---------------------------(end of
> > broadcast)--------------------------- TIP 5: don't
> forget to increase
> > your free space map settings
>
> I think you're getting an error from linux (assuming
> you're on linux)
> not postgres.  When you su - postrgres it tries to
> sign you in as user
> postgres and if this is an installation from a
> distro package there
> probably isn't a directory call /home/postgres.  So
> linux is logging
> you in with / as your "home" directory.
>
> Remember that postgres and linux accounts are
> seperate.  You can long
> in as "joe" to linux and then log into postgres in
> postgreSQL with the
> command:
> psql -U postgres
>
> If you REALLY need to su to postgres then you might
> want to create
> a /home/postgres directory:
> mkdir -p /home/postgres      #as root
> chown postgres:postgres     /home/postgres   #as root
> Then look at your password file to make sure
> postgres is set up as a
> real user.  Open up a text editor as root and see if
> there's a line
> like:
>
postgres:x:1001:1001:postgresql:/home/postgres:/bin/bash
> This tells Linux that there is a user named
> postgres, who's password is
> held in the shadow password file, his user ID is
> 1001, his group ID is
> 1001 and his HOME DIRECTORY is /home/postgres and he
> uses the bash
> shell.
>
> But again, you DON'T need to be logged in as
> postgres ON LINUX to
> access the postgres database ON POSTGRESQL.
>
> Hope this gets you off on the right foot.
>
> John Purser

yes, this helped a lot.  however, i'm getting an error
message...

user@7[/]$ psql -U postgres
psql: FATAL:  Ident authentication failed for user
"postgres"
user@7[/]$ su root
Password:
root@7[/]# psql -U postgres
psql: FATAL:  Ident authentication failed for user
"postgres"

postgres exists, as shown by the following:

postgres@7[/]$ psql
Welcome to psql 8.1.3, the PostgreSQL interactive
terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=# \du
                               List of roles
 Role name | Superuser | Create role | Create DB |
Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
 postgres  | yes       | yes         | yes       | no
limit    |
(1 row)

postgres=#

where to go from here?

tia...

ps - i'm getting close, i can smell it!  thanks for
being patient.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

В списке pgsql-novice по дате отправления:

Предыдущее
От: John Purser
Дата:
Сообщение: Re: postgres db deleted and recreated... "No directory,
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: postgres db deleted and recreated... "No directory,