JeanMertz
2012-Nov-02 11:26 UTC
[Puppet Users] Puppet 3 on OSX, using Puppet gem and running as sudo requires puppet group/user
I''m trying to setup a Puppet script that bootstraps my development machine with some basic installs like Zsh shell, Vim, etc… I have these things working without using sudo to run puppet. However, now I need to modify /etc/shells to add the zsh shell to this list, but to edit this file, I need root rights, or else Puppet complaints: Error: Permission denied - /etc/shells.puppettmp_133 Error: /Stage[main]/Terminal/File[/etc/shells]/content: change from {md5}5fdb14bf853cd42fddc0ad142f09ca0f to {md5}296f3802eb243ce49756d1380f997cba failed: Permission denied - /etc/shells.puppettmp_133 Because of this, I tried running puppet as sudo, but now Puppet complaints that there is no "puppet" group present. Error: /File[/var/lib/puppet/log]: Could not evaluate: Could not find group puppet Debug: Finishing transaction 70276890808620 Error: Got 1 failure(s) while initializing: Could not evaluate: Could not find group puppet (I also tried setting the --logdest parameter to something that is accessible by any user, but that didn''t work either) I''d like to keep my installation clean, and would love for puppet to run without having to add extra users/groups to my OS X installation. However, I guess it would be possible to create the user/group and remove them after the installation, but then the command listed on the installation page for puppet doesn''t work: sudo puppet resource user puppet ensure=present gid=puppet shell=''/sbin/nologin'' # => Error: Could not run: undefined method `string'' for nil:NilClass So my question is this: is there any way to run puppet on a single machine without using the puppet user/group (it worked without sudo, but doesn''t when using sudo). And if not, what would be the best way to get things running and reset to a clean slate (ie. no extra users/groups/folders) after the installation is done? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/aVb7rGE-r0cJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Eric Sorenson
2012-Nov-05 22:01 UTC
[Puppet Users] Re: Puppet 3 on OSX, using Puppet gem and running as sudo requires puppet group/user
Hi Jean, you can track this issue under bug #9862 - https://projects.puppetlabs.com/issues/9862 So, yes you will need root or sudo to edit /etc/shells, that is just unix permissions at work; as an immediate workaround to the error you see with sudo you can run with ''--group 0'' (a number zero/null) on your command line. -=Eric On Friday, November 2, 2012 4:26:04 AM UTC-7, JeanMertz wrote:> > I''m trying to setup a Puppet script that bootstraps my development machine > with some basic installs like Zsh shell, Vim, etc… > > I have these things working without using sudo to run puppet. However, now > I need to modify /etc/shells to add the zsh shell to this list, but to edit > this file, I need root rights, or else Puppet complaints: > > Error: Permission denied - /etc/shells.puppettmp_133 > Error: /Stage[main]/Terminal/File[/etc/shells]/content: change from > {md5}5fdb14bf853cd42fddc0ad142f09ca0f to > {md5}296f3802eb243ce49756d1380f997cba failed: Permission denied - > /etc/shells.puppettmp_133 > > Because of this, I tried running puppet as sudo, but now Puppet complaints > that there is no "puppet" group present. > > Error: /File[/var/lib/puppet/log]: Could not evaluate: Could not find > group puppet > Debug: Finishing transaction 70276890808620 > Error: Got 1 failure(s) while initializing: Could not evaluate: Could not > find group puppet > > (I also tried setting the --logdest parameter to something that is > accessible by any user, but that didn''t work either) > > > I''d like to keep my installation clean, and would love for puppet to run > without having to add extra users/groups to my OS X installation. However, > I guess it would be possible to create the user/group and remove them after > the installation, but then the command listed on the installation page for > puppet doesn''t work: > > sudo puppet resource user puppet ensure=present gid=puppet > shell=''/sbin/nologin'' > # => Error: Could not run: undefined method `string'' for nil:NilClass > > So my question is this: is there any way to run puppet on a single machine > without using the puppet user/group (it worked without sudo, but doesn''t > when using sudo). And if not, what would be the best way to get things > running and reset to a clean slate (ie. no extra users/groups/folders) > after the installation is done? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/tlYxvXQXFEkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.