From: | David <dbree(at)duo-county(dot)com> |
---|---|
To: | operationsengineer1(at)yahoo(dot)com |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: postgres db deleted and recreated... "No directory, logging in with HOME=/" error... |
Date: | 2006-05-06 21:58:47 |
Message-ID: | 20060506215847.GB1333@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Sat, May 06, 2006 at 12:26:14PM -0700, operationsengineer1(at)yahoo(dot)com wrote:
> > On Sat, 6 May 2006 10:11:55 -0700 (PDT)
> > <operationsengineer1(at)yahoo(dot)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!
> > > 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.
FWIW, here's the postgres entry in my /etc/passwd file
postgres:x:31:32:postgres:/var/lib/postgres:/bin/sh
The user ID of 31 indicates that he's entered as a system user.
His home directory is /var/lib/postgres
His login shell is sh, but that probably isn't important.
Umm.. did you delete the _Linux user_ postgres or just the postgres
database?
> yes, this helped a lot. however, i'm getting an error
> message...
>
> user(at)7[/]$ psql -U postgres
> psql: FATAL: Ident authentication failed for user
> "postgres"
> user(at)7[/]$ su root
> Password:
> root(at)7[/]# psql -U postgres
> psql: FATAL: Ident authentication failed for user
> "postgres"
This is because you're using ident authentication for user postgres. I
don't think you can use this option with ident authentication, because
ident authentication checks to see if you're who you say you are, and as
above, it doesn't see you as being postgres, but as root. As I noted in
my previous reply, my postgres user authenticates (locally) by this
method. You will have to su to root and then su to postgres, or
directly with a command like
su -c 'su postgres'
Then, when you're done acting as postgres, you can type exit at the
command prompt and revert straight back to the user you were.
Alternatively, if all you want to do is execute one command as postgres,
you can do as I suggested in my other post.
> where to go from here?
>
> tia...
>
> ps - i'm getting close, i can smell it! thanks for
> being patient.
Sure, it just takes some getting used to.
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Lidman | 2006-05-06 22:05:43 | Re: Switch to Linux Dev Questions |
Previous Message | David | 2006-05-06 21:21:25 | Re: Switch to Linux Dev Questions |