From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | John Purser <jmpurser(at)gmail(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 19:26:14 |
Message-ID: | 20060506192614.36732.qmail@web33307.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
> 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!
> >
> > 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(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"
postgres exists, as shown by the following:
postgres(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2006-05-06 19:55:05 | Re: postgres db deleted and recreated... "No directory, |
Previous Message | John Purser | 2006-05-06 18:47:43 | Re: postgres db deleted and recreated... "No directory, |