Default Postgres Password

Richard L. Hamilton rlhamil at smart.net
Sun Nov 25 14:33:13 PST 2012


On Nov 25, 2012, at 5:12 PM, Stephen Rasku wrote:

> On Sun, Nov 25, 2012 at 1:27 PM, Brandon Allbery <allbery.b at gmail.com> wrote:
> On Sun, Nov 25, 2012 at 3:58 PM, Stephen Rasku <macports at srasku.net> wrote:
> It's asking me for a password when I do that.
> 
> Not directly; wrap it in sudo, since root can then su to any user without a password.
> 
> I did "sudo psql90" and it still asked me for a password:
> 
> $ sudo psql90
> Password: 
> psql90: FATAL:  password authentication failed for user "root"
> $ sudo psql90 -U postgres
> Password for user postgres: 
> psql90: FATAL:  password authentication failed for user "postgres"
> 
> ...Stephen
> 

The default /etc/sudoers includes the line
%admin	ALL=(ALL) ALL

which allows any admin account (any account with membership in admin group) to run any command as any other account (root by default), prompting for the invoking account's password if they haven't already entered it recently (the timestamp of a directory in /var/db/sudo records when that last happened).

If that doesn't work, then you're either not a member of admin group, or /etc/sudoers has been modified to remove or alter that line, or /usr/bin/sudo does not have the setuid bit set (or your path is finding some other version of sudo, but that's not likely).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20121125/82404fa7/attachment.html>


More information about the macports-users mailing list