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

> On Sun, Nov 25, 2012 at 1:27 PM, Brandon Allbery <[email protected]> wrote:
> On Sun, Nov 25, 2012 at 3:58 PM, Stephen Rasku <[email protected]> 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).

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to