Project

General

Profile

Actions

Bug #23236

closed

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

Added by Matt Cahill about 6 years ago. Updated over 5 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 #1

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
Actions #2

Updated by Anonymous almost 6 years ago

  • translation missing: en.field_release set to 330
Actions #3

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Anonymous almost 6 years ago

  • Target version deleted (1.18.0)
Actions #5

Updated by Ewoud Kohl van Wijngaarden over 5 years ago

  • Target version changed from 546 to 1.18.0
  • Triaged set to No
  • Fixed in Releases 1.18.0 added
Actions

Also available in: Atom PDF