At the end it was a sudo misconfiguration: Defaults log_year, log_host, loglinelen=0, logfile=/var/log/sudo.log, noexec This line with noexec was problematic ;) Thanks for the help! BR, Rafal. 2016-09-07 2:25 GMT+02:00 Steven Tardy <sjt5atra at gmail.com>: > > > On Sep 6, 2016, at 6:18 AM, Rafał Radecki <radecki.rafal at gmail.com> > wrote: > > > > # sudo -H -E -u postgres /bin/bash -c /usr/bin/python2.7 > > > Works for me. *shrug* > > Is your postgres user a service account or something else strange about it? > Does 'passwd --status postgres' hint at anything? > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >