473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Creating DB with pass, but pass not required to connect

Hi folks. I'm creating a database using the following command:

createdb -U pablo -W pablotest1

I'm prompted to enter the password to create the DB, and after doing so
the db is created successfully.

However, when I connect to this database via a php script, I can enter
any valid database user, and I can enter anything for the password (or
leave it blank), and I'm still able to connect.

So, each of these connection calls works:

$conn->Connect('localhost','pablo','realpass','pablotest 1');
$conn->Connect('localhost','pablo','','pablotest1');
$conn->Connect('localhost','pablo','abc123','pablotest1' );
$conn->Connect('localhost','bsc','notapass','pablotest1' );
$conn->Connect('localhost','bsc','','pablotest1');

Obviously I'm doing something wrong here, since I don't want scripts to
be able to connect without the proper credentials.

Can anyone give me an idea if I'm executing the createdb command
incorrectly, or if something on the server level might be causing this?

Cheers and TIA,

Pablo

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
1 2328
"Pablo Gosse" <go****@unbc.ca> writes:
However, when I connect to this database via a php script, I can enter
any valid database user, and I can enter anything for the password (or
leave it blank), and I'm still able to connect.


Sounds like you don't have pg_hba.conf configured to demand password
authentication. See
http://www.postgresql.org/docs/7.4/s...ntication.html

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paradigm | last post by:
I want to create a pass through query in Access to get data from a MYSQL table. I need to do this using code so that certain aspects of the query can be changed. When I look at the SQL version of...
7
by: mike | last post by:
Hi, I am having difficulty in creating a thread using pthread_create. It seems that pthread_create does not execute 'program', and returns -1; I have checked the API but I am not sure why this...
1
by: Rob | last post by:
Hi, I am creating a DataList with many CheckBoxes. When I click the Update button the UpdateCommand fires and my code looks at each CheckBox and determines if it is checked or not. The way I...
14
by: John Salerno | last post by:
Since the connect method of mysqldb requires a database name, it seems like you can't use it without having a database already created. So is there a way to connect to your mysql server (without a...
0
by: colmkav | last post by:
HI, anyone know why this code doesnt work? I am trying to set up the connect property of a tabledef so that it uses a given login and password. however once I run it I still need to login when I...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
17
Motoma
by: Motoma | last post by:
This article is cross posted from my personal blog. You can find the original article, in all its splendor, at http://motomastyle.com/creating-a-mysql-data-abstraction-layer-in-php/. Introduction:...
3
by: iogilvy | last post by:
i wish to have some extended functionality added to sockets i can create my own socket class class mysocket(socket.socket): and all should be fine. Except, the sockets are created for me by...
5
by: Mr. X. | last post by:
Hello. In Visual Studio 2008, there is on the toolbox -login -login, which create a login form. On that form there is a LoginButton, which click on it is evented on the "default.aspx.vb"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.