Project

General

Profile

Actions

Bug #23236

closed

mcollective puppetrun via sudo does not use correct home dir on some distros

Added by Matt Cahill over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions

Also available in: Atom PDF