From: Jamie C. <jca...@we...> - 2003-01-05 01:37:42
|
William Bradley wrote: > On Fri, 2003-01-03 at 07:14, Jamie Cameron wrote: > > >>>Thank you for the above Jamie. When I tried to log in as "root" it >>>provoked the above message. When I did as you suggested, following is >>>the "config" file you mention: >>> >>>start_cmd=/etc/rc.d/init.d/postgresql start >>>perpage=25 >>>stop_cmd=/etc/rc.d/init.d/postgresql stop >>>basedb=template1 >>>login=root >>>psql=/usr/bin/psql >>>pid_file=/var/run/postmaster.pid >>>hba_conf=/var/lib/pgsql/data/pg_hba.conf >>>setup_cmd=/etc/rc.d/init.d/postgresql start >>>nodbi=0 >>>pass=purple >>> >>>As you can see the "root" name and password are listed. ?? >> >>And can you login to the database at the command line with the psql >>command using that username and password? > > > When I do the following, with "psql" only, as a user, the system loads > as I have a db named "william" in there as a test. > > [william@localhost william]$ psql > Welcome to psql, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help on internal slash commands > \g or terminate with semicolon to execute query > \q to quit > > william=# > > Originally I did the following to set up "william" as a user. > > [william@localhost william]$ su > Password: > [root@localhost william]# su - postgres > -bash-2.05b$ createuser > Enter name of user to add: william > Shall the new user be allowed to create databases? (y/n) y > Shall the new user be allowed to create more new users? (y/n) y > CREATE USER > -bash-2.05b$ > > Hope this helps. Is there a 'root' user in the your postgresql database? Usually the database's main admin users is called 'postgres', so you need to put its login and password in the config file. You may also need to add the line unix=postgres because in some postgresql configurations, the database uses the Unix username of the connecting user to verify clients, rather than a login and password. That unix=postgres line tells Webmin to switch to the user 'postgres' before running database commands. The next version will hopefully simplify some of the postgresql connection problems related to this .. - Jamie |