Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    17

    Unanswered: create database and login role

    Hello,
    I am new to postgres and I tried to create a database (using some third party tools) but it accept only my current windows user as a user name which is not what I want to do

    Is there a way to create a database without using current "logged" windows user for user name ?

    I am trying to do this process with sql script so I can run the script on the customer PC and it create every thing with my user and password in the same time I dont give the customer any way to login to the database using any default user name

    Thanks
    Last edited by isaac_cm; 08-19-09 at 17:04.

  2. #2
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    I'm not sure I understand the question or the symptoms, but I'll give it a shot and if I'm off the mark you can clarify.

    First thought is that it's a problem with your 3rd party tool (which we don't support here).
    Second thought is that your pg_hba.conf is set to ident which requires that you are logged in to the os and will only use current user.

    Generally, if you are going to script something, you'll use the command line psql client instead of a 3rd party GUI tool.
    Last edited by artacus72; 08-25-09 at 10:48.

  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Also, in pg_hba.conf, make sure that the database for the login is not configured for sameuser.
    Quote Originally Posted by pg documentation
    ...
    # allow local users to connect only to their own databases (databases
    # with the same name as their database user name)...
    #
    # TYPE DATABASE USER CIDR-ADDRESS METHOD
    local sameuser all md5
    Ref the PostgreSQL Documentation
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  4. #4
    Join Date
    Aug 2009
    Posts
    17
    thanks alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •