RHEL6 using real rather than effective UID in sendmail
How do I change it to use effective UID?
We run NetBackup as the root user on our RHEL6 server. It sends emails for various things and has always sent them as root@<host.domain.ext>.
Recently I created an account for myself on the server and yesterday did a "sudo su -" to become root. After that I stopped and started NetBackup as the root user.
This morning I realized that it is now sending emails as my real user ID rather than the effective (root) user ID I'd become. The processes are definitely running as root so it appears to still know my real user ID.
As a test I sent email from command line using mailx after doing a "sudo su -" and sure enough found it is sending as my real user ID instead of the effective (root) user ID. Comparing this with my RHEL5 installations I don't see this behavior so it appears something has changed in RHEL6 or the Sendmail version it runs that is forcing this.
I made no configuration changes to Sendmail when I setup my account and there is nothing in /etc/mail files that knows my real user ID.
Clearly restarting the application by doing direct login as root solves the issue with that application. However, I'd much rather be able to do it with "sudo su -". How can I make Sendmail use effective ID rather than real ID when sending email? (Or maybe - how can I get Sendmail to forget real ID altogether?)
p.s. I'm not talking about running something like "mailx -r" to set return user - that works - I'm talking about configuring sendmail itself so that it always uses effective user rather than real user.
Last edited by MensaWater; 08-09-2011 at 03:39 PM.