Prosenjit Ghosh
2012-Aug-22 09:50 UTC
[Puppet Users] how to connect agent to the master through a different user to execute a command through puppet module
Created a puppet master in one Linux.X64/rh50 machine. Created a puppet agent in another Linux.X64/rh50 machine. Need to run any command from puppet master and that will execute in puppet agent when puppet agent will connect to puppet master. This is happening correctly for me when created master and agent through root user. But I need to execute a command that wont allow root user. I need any user except root. I tried successfully to create puppet master through a different user. But not able to execute the command when connecting the agent through that different user. Any suggestion on this how to connect agent to the master through a different user to execute a command through puppet module -- 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/-/Koetw54t2mAJ. 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.
Nick Fagerlund
2012-Aug-22 17:25 UTC
[Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module
I don''t understand what you''re doing. But it sounds like you might need the "user" attribute of the exec type? exec {''some command'': user => ''admin'', } See http://docs.puppetlabs.com/references/latest/type.html#exec and scroll down a bit. On Wednesday, August 22, 2012 2:50:28 AM UTC-7, Prosenjit Ghosh wrote:> > Created a puppet master in one Linux.X64/rh50 machine. > Created a puppet agent in another Linux.X64/rh50 machine. > > Need to run any command from puppet master and that will execute in puppet > agent when puppet agent will connect to puppet master. > > This is happening correctly for me when created master and agent through > root user. > > But I need to execute a command that wont allow root user. I need any user > except root. I tried successfully to create puppet master through a > different user. But not able to execute the command when connecting the > agent through that different user. > > Any suggestion on this how to connect agent to the master through a > different user to execute a command through puppet module > >-- 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/-/Y2EWm3dKGIUJ. 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.
Prosenjit Ghosh
2012-Aug-23 06:06 UTC
Re: [Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module
Thanks so much for your time. WIll try that. Actually we have written a module on puppet-master which will run one command (Installer command) on agent node when any agent connects to the master. This command wont work if this has root permission. So we install and configure puppet master and agent using some other user except "root". This worked successfully. Now we are not able to connect the agent to the puppet master using this different user except "root". This is the problem. Anyway we will give this a try as per your suggestion. And also thanks very much for our help. Thanks On Wed, Aug 22, 2012 at 10:55 PM, Nick Fagerlund <nick.fagerlund@puppetlabs.com> wrote:> I don''t understand what you''re doing. But it sounds like you might need the > "user" attribute of the exec type? > > exec {''some command'': > user => ''admin'', > } > > See http://docs.puppetlabs.com/references/latest/type.html#exec and scroll > down a bit. > > On Wednesday, August 22, 2012 2:50:28 AM UTC-7, Prosenjit Ghosh wrote: >> >> Created a puppet master in one Linux.X64/rh50 machine. >> Created a puppet agent in another Linux.X64/rh50 machine. >> >> Need to run any command from puppet master and that will execute in puppet >> agent when puppet agent will connect to puppet master. >> >> This is happening correctly for me when created master and agent through >> root user. >> >> But I need to execute a command that wont allow root user. I need any user >> except root. I tried successfully to create puppet master through a >> different user. But not able to execute the command when connecting the >> agent through that different user. >> >> Any suggestion on this how to connect agent to the master through a >> different user to execute a command through puppet module > > -- > 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/-/Y2EWm3dKGIUJ. > > 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.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Prosenjit Ghosh
2012-Aug-23 13:05 UTC
Re: [Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module
Hi Nick, Your suggestion is not working. Actually when we try to connect the agent to the puppet through a different user, no ssl directory got created under /var/lib/puppet in agent side. Can you provide some light on this. Your help would be most appreciated. Thanks Prosenjit On Thu, Aug 23, 2012 at 11:36 AM, Prosenjit Ghosh <prosenjitcs@gmail.com> wrote:> Thanks so much for your time. > WIll try that. > Actually we have written a module on puppet-master which will run one > command (Installer command) on agent node when any agent connects to > the master. > This command wont work if this has root permission. > So we install and configure puppet master and agent using some other > user except "root". This worked successfully. > Now we are not able to connect the agent to the puppet master using > this different user except "root". This is the problem. > Anyway we will give this a try as per your suggestion. > > And also thanks very much for our help. > > Thanks > > On Wed, Aug 22, 2012 at 10:55 PM, Nick Fagerlund > <nick.fagerlund@puppetlabs.com> wrote: >> I don''t understand what you''re doing. But it sounds like you might need the >> "user" attribute of the exec type? >> >> exec {''some command'': >> user => ''admin'', >> } >> >> See http://docs.puppetlabs.com/references/latest/type.html#exec and scroll >> down a bit. >> >> On Wednesday, August 22, 2012 2:50:28 AM UTC-7, Prosenjit Ghosh wrote: >>> >>> Created a puppet master in one Linux.X64/rh50 machine. >>> Created a puppet agent in another Linux.X64/rh50 machine. >>> >>> Need to run any command from puppet master and that will execute in puppet >>> agent when puppet agent will connect to puppet master. >>> >>> This is happening correctly for me when created master and agent through >>> root user. >>> >>> But I need to execute a command that wont allow root user. I need any user >>> except root. I tried successfully to create puppet master through a >>> different user. But not able to execute the command when connecting the >>> agent through that different user. >>> >>> Any suggestion on this how to connect agent to the master through a >>> different user to execute a command through puppet module >> >> -- >> 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/-/Y2EWm3dKGIUJ. >> >> 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.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
jcbollinger
2012-Aug-27 19:12 UTC
Re: [Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module
On Thursday, August 23, 2012 8:05:20 AM UTC-5, Prosenjit Ghosh wrote:> > Hi Nick, > > Your suggestion is not working. > > Actually when we try to connect the agent to the puppet through a > different user, no ssl directory got created under /var/lib/puppet in > agent side. > > Can you provide some light on this. >The agent must run as a privileged user, typically root, in order to be able to do its work. That work might include, for example, applying an Exec resource, such as one that runs your installer. If such an Exec''s ''user'' parameter is set, then the agent will assume the identity of the specified user while running the command. You do not need the agent overall to run as that user. John -- 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/-/MPFBN86vv3wJ. 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.