Max Kamensky
2011-Apr-08 11:23 UTC
[Puppet Users] How to write to user''s crontab in domain environment?
Hello All puppet clients PCs are Ubuntu 10.04lts and have membership in Samba/LDAP domain. Puppet server is the member of Samba/LDAP domain also. It''s possible to log on as any domain user to Puppet server. So :) The problem: We''d like to start tasks with rights and environment of logged user. We need to have at every user''s crontab such string 0 * * * * /home/scripts/changepic.sh Configs: part of "/etc/puppet/puppet.conf" [puppetmasterd] node_terminus=ldap ldapserver = dc=imexgroup,dc=loc ldapbase = ou=people,dc=imexgroup,dc=loc ldapuser = cn=admin,dc=imexgroup,dc=loc ldappassword = password part of "/etc/puppet/manifests/site.pp" cron { "set_wallpaper": command => "/home/scripts/changepic.sh", user => $username, hour => "0", minute => "*" } As far as I understand smth is wrong with syntax in cron "user => $username," Will you be so kind to assist with this problem -- maxickv@gmail.com regards, Max Kamensky icq: 29258337 skype: maxkamensky -- 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.
Pietro Monteiro
2011-Apr-08 19:11 UTC
Re: [Puppet Users] How to write to user''s crontab in domain environment?
On 04/08/2011 04:23 AM, Max Kamensky wrote:> As far as I understand smth is wrong with syntax in cron "user => > $username,"What is $username? A facter, a variable you''ve set up? Did you try adding something like ''notify{"username: ${username":}'' and manually running the puppet agent to verify if $username is being correctly set? -- Pietro Monteiro Senior Developer DECK Monitoring 115 W 8th Ave. Eugene, Oregon 97401 Office: 541-343-0110 www.deckmonitoring.com -- 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.