Are you working in a domain environment? If not, can you set one up (a Samba-based NT domain should be just fine. Active Directory is better of course)?
With a domain, the computer itself will have a domain account, and you can add computers to the permissions for a share the same way you can give users permissions. I'd recommend creating a group that contains all your computers, and then giving that group permissions on your share.
-----Original message-----
From: Andrea Campi < >
Sent: Thu 01-31-2013 05:00 am
Subject: [chef] Installing a package from a password-protected UNC share
To: ;
Ohai Chefs,I'm seeking help from those of you who have more Windows-fu than I.I need to install some software from a Windows share.Unfortunately there doesn't seem to be a way to specify username and password in a UNC path and give that to either the windows_service or remote_file resource. Or is there?Failing that, we tried something like this:execute "mount share #{drive}" docommand "net use #{drive}: #{path} /user:#{username} #{password} /persistent:No"endwindows_package "Symantec Anti-Virus" dosource "#{drive}:\\#{node['symantec-antivirus']['installer']['arch_file']}"options "/qn ALLUSERS=1 REBOOT=ReallySuppress"action :installend
execute "unmount share #{drive}" docommand "net use /d #{drive}:"endThis sucks in many ways (deciding which drive letter to use is tricky, any failure will leave mapped drives around, …).Worse, it doesn't work when chef-client is run a service!STDERR: System error 1312 has occurred.A specified logon session does not exist. It may already have been terminated.Googling about this stuff, it seems there is a way around this error by using a PSEXEC.EXE, but I would rather avoid that is possible.Thoughts?Andrea
Archive powered by MHonArc 2.6.16.