Creating users from shell or perl script - Mailing list pgsql-novice

From Danny Aldham
Subject Creating users from shell or perl script
Date
Msg-id 200111230329.fAN3Tda24406@lennon.postino.com
Whole thread Raw
Responses Re: Creating users from shell or perl script
List pgsql-novice
I have written a program that will install some software,
create a database, and create a couple of postgres users. Most
everything is working, but I cannot see how to create postgres
users with set passwords. If the script calls createuser the
prompts do not come to the user, and anyway I do not want them to.
I want to be able to create the user with a password and not have
the person running the script see it. Right now I am trying in perl:
$output = `/usr/local/pgsql/bin/createuser $New_User ` ;

I have tried attaching using DBI but don't know what DB to attach to.

Any hints or tips appreciated.

--
Danny Aldham     Providing Certified Internetworking Solutions to Business
www.postino.com  E-Mail, Web Servers, Web Databases, SQL PHP & Perl

pgsql-novice by date:

Previous
From: Francisco Reyes
Date:
Subject: Sizing a box for PostgreSQL
Next
From: Oliver Elphick
Date:
Subject: Re: Creating users from shell or perl script