Puppet exec default user

380 views
Skip to first unread message

virgil

unread,
Jun 26, 2014, 4:45:29 PM6/26/14
to puppet...@googlegroups.com
Hi guys,

I wonder when I executed the following command, 
eg:
class cal{
        exec{'perms':
        command => 'C:\Windows\System32\calc.exe',
        logoutput => true
        }
}
What is the default execute user? Or which log can I reference to find it out?

Thanks.
Virgil

virgil

unread,
Jun 26, 2014, 5:35:47 PM6/26/14
to puppet...@googlegroups.com

I find this in http://docs.puppetlabs.com/references/latest/type.html#cron-attribute-user.

This property defaults to the user running Puppet or root.

May I assume it's same for exec?

Rob Reynolds

unread,
Jun 26, 2014, 5:57:17 PM6/26/14
to puppet...@googlegroups.com
The user running the command. If you were logged in and running it, you would be the user. If it's the agent running the command, the service defaults the user to SYSTEM during installation. That can be changed to another user if you want it to be.

To answer the question you have not asked yet, you cannot run exec as a different user on Windows. See PUP-532[1] for more details.



 

Thanks.
Virgil

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2f17ebfd-9b2b-4983-98a8-10a955e2d7f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014September 20-24 in San Francisco
Register by July 31st to take advantage of the Early Bird discount save $249!

virgil

unread,
Jun 26, 2014, 6:28:46 PM6/26/14
to puppet...@googlegroups.com
Thank you so much! Your answer is perfect for me.
Reply all
Reply to author
Forward
0 new messages