Bug #23236
closedmcollective puppetrun via sudo does not use correct home dir on some distros
Description
Choria's (https://github.com/choria-io/mcollective-choria) mcollective ssl auth plugin looks for authentication keys in the running user's home directory.
When executed via sudo -u '~' is expanded to the running user's home directory rather than the impersonated user causing an authentication error.
e.g.
sysadmin@puppet:/usr/share/foreman-proxy$ sudo -u foreman-proxy /opt/puppetlabs/bin/mco find
The find application failed to run, use -v for full error backtrace details: No such file or directory @ rb_sysopen - /home/sysadmin/.puppetlabs/etc/puppet/ssl/certs/foreman-proxy.mcollective.pem
This is confirmed as an issue on Ubuntu because sudo's env_keep is set to exclude $HOME by default on that distro. It may be an issue on other distros too.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
Updated by Anonymous over 6 years ago
- Translation missing: en.field_release set to 330
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 6e81b2ed589061348076ea021411ed65d69d47ce.
Updated by Ewoud Kohl van Wijngaarden about 6 years ago
- Target version changed from 546 to 1.18.0
- Triaged set to No
- Fixed in Releases 1.18.0 added