linux - Puppet - How to chage umask setting for the previlage user -
for changing umask setting , had created puppet script insert line "umask 0027" in file "/etc/profile" , doesn't show umask value 0027, when echo umask. when relogin show value 0027. take effect after relogin.
but want immediate effect of change without relogin , added 1 more line puppet script "source /etc/profile" doesnot work , gave error below
'source /etc/profile' not qualified , no path specified. please qualify command or specify path.
could me on issue ?
my puppet file looks below
exec {"modify-umask-entry": command => "sed -i 's/umask [0-9]\{3,\}/umask 027/g' /etc/profile", path => "/bin:/usr/bin/", } exec { "/bin/echo 'umask 027' >> '/etc/profile'": unless => "/bin/grep -fx 'umask[\t][0-9]{3}' '/etc/profile'", # onlyif => "/bin/grep -i 'umask[ \t][0-9]{3}' /etc/profile | wc -w", } exec {"seeting_new_umask": command => "source /etc/profile", }
Comments
Post a Comment