Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm conservative about my sudoers policy. I'm trying to allow wheel users to run psql postgres postgres as the postgres user (because when ident that's the only way it works).

root ALL=(ALL) ALL
%wheel ALL=/usr/bin/psql

here's the error

 Sorry, user xenoterracide is not allowed to execute '/usr/bin/psql postgres postgres' as postgres on slave-vi.

The command I'm running is

sudo -u postgres psql postgres postgres 

The policy works for executing things as root, but I just need this specific command to run as postgres.

share|improve this question

1 Answer 1

up vote 0 down vote accepted
%wheel ALL = (postgres) /usr/bin/psql
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.