Issue #19709 has been updated by Roger Kennedy.
Status changed from Unreviewed to Needs More Information
Assignee set to James Turnbull
no repro for me on Debian 7 3.1.1 or 3.2.2.
neoice@neoice-dev2:~% id
uid=500(neoice) gid=50(staff) groups=50(staff)
neoice@neoice-dev2:~% puppet --version
3.2.2
neoice@neoice-dev2:~% puppet resource --trace user root
user { 'root':
ensure => 'present',
comment => 'root',
gid => '0',
home => '/root',
shell => '/bin/zsh',
uid => '0',
}
neoice@neoice-dev2:~% puppet --version
3.1.1
neoice@neoice-dev2:~% puppet resource --trace user root
user { 'root':
ensure => 'present',
comment => 'root',
gid => '0',
home => '/root',
shell => '/bin/zsh',
uid => '0',
}
neoice@neoice-dev2:~% cat /etc/debian_version
7.1
neoice@neoice-dev2:~% uname -a
Linux neoice-dev2 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64
GNU/Linux
----------------------------------------
Bug #19709: Puppet resource running as non-root errors
https://projects.puppetlabs.com/issues/19709#change-94558
* Author: James Turnbull
* Status: Needs More Information
* Priority: Normal
* Assignee: James Turnbull
* Category: ralsh
* Target version:
* Affected Puppet version: 3.1.0
* 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.