|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Security Issue
I wrote a script that copies a file from a domain shared folder and placed it
in the "Computer Logon" script section of AD. It seems that I am having problems with accessing the shared folder since the script is running on the local administrator account when the computer starts-up. Is there a work around for this? Danny Tiongco wrote:
> I wrote a script that copies a file from a domain shared folder and placed it To be able to access files over the network from the computer startup> in the "Computer Logon" script section of AD. It seems that I am having > problems with accessing the shared folder since the script is running on the > local administrator account when the computer starts-up. > > Is there a work around for this? Hi, script, you could put the file(s) on a network share and grant read access for the AD group "Domain Computers" to the share. Alternatively, from the startup script, you could map a drive on the fly, like this: sDomainUser = "arp.corp\computer_fix" sPswd = "something" Set oNetwork = CreateObject("Wscript.Network") oNetwork.MapNetworkDrive _ "Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx Thank you so much. It was a great help.
Show quote "Torgeir Bakken (MVP)" wrote: > Danny Tiongco wrote: > > > I wrote a script that copies a file from a domain shared folder and placed it > > in the "Computer Logon" script section of AD. It seems that I am having > > problems with accessing the shared folder since the script is running on the > > local administrator account when the computer starts-up. > > > > Is there a work around for this? > Hi, > > To be able to access files over the network from the computer startup > script, you could put the file(s) on a network share and grant read > access for the AD group "Domain Computers" to the share. > > Alternatively, from the startup script, you could map a drive on > the fly, like this: > > sDomainUser = "arp.corp\computer_fix" > sPswd = "something" > > Set oNetwork = CreateObject("Wscript.Network") > > oNetwork.MapNetworkDrive _ > "Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd > > > > -- > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway > Administration scripting examples and an ONLINE version of > the 1328 page Scripting Guide: > http://www.microsoft.com/technet/scriptcenter/default.mspx > |
|||||||||||||||||||||||