Ask Your Question
0

manage PuppetDB with superuser pe-postgres

asked 2013-09-03 06:14:45 -0600

ddk gravatar image

updated 2013-09-04 11:05:28 -0600

Hi

We are currently run pe-puppet-enterprise-release-3.0.1-1 and pe-puppetdb-1.3.3-1.

We are not able to manage postgresql with superuser pe-postgres ... always got authentication failed problem

And if we try to create a user with postgresql::database_use&&grant, the user won't be able to SELECT on any tables even though we set it to be superuser ...

Anyone could help ? Any easy way to manage pe-postgres db ?

postgresql::database_user{ 'dbadmin':
    db => 'pe-puppetdb',
    password_hash => postgresql_password('dbadmin', 'mypasswd'),
    createdb   => 'true',
    createrole => 'true',
    superuser  => 'true',
    require    => Class['postgresql::server'],
  } 

  postgresql::database_grant{'grant_dbadmin':
    privilege   => 'ALL',
    db          => 'pe-puppetdb',
    role        => 'dbadmin',
  }
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-01-08 19:27:37 -0600

nvpuppet gravatar image

updated 2014-01-08 19:27:55 -0600

By default, the system user pe-postgres has shell=/bin/false and thus you won't be able to login as that user. You can adjust that like so:

master# puppet resource user pe-postgres shell=/bin/bash
master# sudo su - pe-postgres
master$ psql 
psql (9.2.4)
Type "help" for help.

pe-postgres=#

The above should work on fresh PE installs. It's possible that in trying to adjust the credentials of the pe-postgres user in the Puppet code you show above you might have gotten yourself into a state where the above is not sufficient to give you admin access. I ... (more)

edit flag offensive delete link more

Comments

This resolved the issue for me thanks!

MsFantastic gravatar imageMsFantastic ( 2014-09-05 17:38:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-09-03 06:14:45 -0600

Seen: 461 times

Last updated: Jan 08 '14