Skip site navigation (1) Skip section navigation (2)

Creating users from shell or perl script

From: Danny Aldham <danny(at)lennon(dot)postino(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Creating users from shell or perl script
Date: 2001-11-23 03:29:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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  E-Mail, Web Servers, Web Databases, SQL PHP & Perl


pgsql-novice by date

Next:From: Oliver ElphickDate: 2001-11-23 06:59:16
Subject: Re: Creating users from shell or perl script
Previous:From: Danni CoyDate: 2001-11-22 18:15:13
Subject: Emergency backup question.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group