Issue #2137 has been reported by lludwig.
----------------------------------------
Bug #2137: puppet init.d script runs as sudo's home folder, not root's
http://projects.reductivelabs.com/issues/2137
Author: lludwig
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version: 0.24.8
Complexity: Unknown
Affected version: 0.24.7
Keywords:
On CentOS/RH I've discovered that any restart of the daemon via sudo will cause
unexpected results with scripts/applications that rely on the home folder of
root (ie /root). This was a problem I experienced with mysql and mysql plugins
and modules were expecting a .my.cnf for accessing mysql without having to
display username/password insecurely.
To test I created a class that ran to display env data.
<pre>
class test {
exec { "env; set":
logoutput => true,
}
}
</pre>
When I restarted via root user (ie su - root)
<pre>
HOME=/root
</pre>
As 'sudo service puppet restart'
<pre>
HOME=/home/larry
</pre>
To force puppetd to run as not only root perms but root folder
The solution is to add '--user root' to the init.d script the daemon function
call:
<pre>
daemon --user root $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}
</pre>
I assume this issue will also happen on other distros/platforms and have not
tested the results of the startup scripts.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---