Issue #19709 has been updated by Charlie Sharpsteen.

Status changed from Needs More Information to Accepted
Assignee deleted (James Turnbull)
Affected Puppet version changed from 3.1.0 to 3.2.2

This is re-producible, at least on CentOS, with the current version of Puppet 
(ref. #21746).

----------------------------------------
Bug #19709: Puppet resource running as non-root errors
https://projects.puppetlabs.com/issues/19709#change-94586

* Author: James Turnbull
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: ralsh
* Target version: 
* Affected Puppet version: 3.2.2
* Keywords: puppet resource user root permissions sudo 
* Branch: 
----------------------------------------
Behaviour: When running puppet resource as a non-root user an error is generated

<pre>
$ puppet resource --trace user root 
Error: Could not run: undefined method `exists?' for nil:NilClass
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type/user.rb:78:in `retrieve'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type/user.rb:378:in `block 
in retrieve'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type/user.rb:372:in `each'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type/user.rb:372:in `inject'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type/user.rb:372:in 
`retrieve'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type.rb:1041:in 
`retrieve_resource'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/type.rb:2380:in `to_resource'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/indirector/resource/ral.rb:10:in
 `find'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/indirector/indirection.rb:191:in
 `find'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application/resource.rb:218:in
 `find_or_save_resources'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application/resource.rb:142:in
 `main'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application.rb:372:in 
`run_command'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application.rb:364:in `block 
(2 levels) in run'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application.rb:456:in 
`plugin_hook'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application.rb:364:in `block 
in run'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/util.rb:504:in `exit_on_fail'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/application.rb:364:in `run'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/util/command_line.rb:132:in 
`run'
/usr/local/share/gems/gems/puppet-3.1.0/lib/puppet/util/command_line.rb:86:in 
`execute'
/usr/local/share/gems/gems/puppet-3.1.0/bin/puppet:4:in `<top (required)>'
/usr/local/bin/puppet:23:in `load'
/usr/local/bin/puppet:23:in `<main>'
</pre>

Platform:
Puppet 3.1.0
ruby 1.9.3p392 (2013-02-22 revision 39386) [i386-linux]
Fedora 18 - Linux echo.lovedthanlost.net 3.7.2-204.fc18.i686.PAE #1 SMP Wed Jan 
16 16:31:26 UTC 2013 i686 i686 i386 GNU/Linux

Expected behaviour: Return error message saying permission denied as Puppet 
can't retrieve the users without sudo/root


-- 
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://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to