Re: assigning password from script - Mailing list pgsql-general

From Pavel Stehule
Subject Re: assigning password from script
Date
Msg-id 162867790707022325i7e0a82bbj400cb5a43554456b@mail.gmail.com
Whole thread Raw
In response to Re: assigning password from script  ("Ashish Karalkar" <ashish.karalkar@info-spectrum.com>)
List pgsql-general
Hello

try

 psql postgres -c "create role tom login password 'hello'"

Regards
Pavel


2007/7/3, Ashish Karalkar <ashish.karalkar@info-spectrum.com>:
> ----- Original Message ----- >
> > 2007/7/2, Ashish Karalkar <ashish.karalkar@info-spectrum.com>:
> >
> >
> > Hello All,
> >
> > I want to create a user through script and dont want user to assign
> > password
> >  interactively, I want it to be assigned  through some file or anything
> > else
> >
> > some this like
> >
> > createuser -P ***** OR createuser -P <file >
> >
> > Is there any way?
> From: "Pavel Stehule" <pavel.stehule@gmail.com>
> To: "Ashish Karalkar" <ashish.karalkar@info-spectrum.com>
> Cc: <pgsql-general@postgresql.org>
> Sent: Monday, July 02, 2007 11:24 AM
> Subject: Re: [GENERAL] assigning password from script
>
>
> >> Hello
> > >
> > >look on http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html
> > >
> > >Pavel Stehule
> Thanks Pavel Stehule for your replay,
>
> As far as I understand the guide lines talk about providing the password
> from .pgpass whene ever server requires it and not to assign the password to
> the user.
>
> "   The file .pgpass in a user's home directory or the file referenced by
> PGPASSFILE can contain passwords to be used if the connection requires a
> password"
>
>
> Please correct me if I am wrong and if I understood correctly then Please
> suggest me the way to assign password to user while its creation from a
> file/ or anything else than prompting for password from terminal
>
>
> With Regards
> Ashish....
>
>

pgsql-general by date:

Previous
From: "Ashish Karalkar"
Date:
Subject: Re: assigning password from script
Next
From: "Albe Laurenz"
Date:
Subject: Re: Tables not created in proper schema