Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to push down a hosts file to a group of public access computers

Posted on 2009-04-21
16
Medium Priority
?
225 Views
Last Modified: 2012-05-07
I am trying to push down a hosts file to a group of public access computers and I'm having a tough time with the security. The login script won't run the batch file to replace the hosts file. Anyone have a solution to this? We run kixscripts currently
0
Comment
Question by:johnbowden
  • 9
  • 7
16 Comments
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24199641
Just run it as a startup script
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24199663
The startup script will run in the "system" context and give it permission, whereas running as a login script the user probably didnt have the needed permissions.
0
 

Author Comment

by:johnbowden
ID: 24199782
this is the batch file called updatehost.bat

xcopy \\server1\netlogon\hostsfile\hosts "%systemroot%\system32\drivers\etc\" /C /H /R /Y

so you're saying to add this Active Directory Group Policy Management, Edit or create a GPO, and double-click on User Configuration --> Windows Settings --> Scripts (Logon/Logoff) --> Logon

I can't get the batch file to run
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24200955
NO, add this to

COMPUTER CONFIGURATION>>>WINDOWS SETTINGS>>> SCRIPTS(startup/shutdown)
0
 

Author Comment

by:johnbowden
ID: 24201038
Ok, still it doesn't work.
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24201059
did you try running gpupdate /force /boot
0
 

Author Comment

by:johnbowden
ID: 24205176
yes and it still doesn't work. the hosts fill is left untouched.
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24205281
does the .bat run on client machine manually?
0
 
LVL 47

Accepted Solution

by:
Donald Stewart earned 750 total points
ID: 24205356
0
 

Author Comment

by:johnbowden
ID: 24205397
the batch file runs fine on the client computers as long as it is logged in as administrator or equivelent
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24205470
Does netlogon have "Authenticated Users" in NTFS permissions? if not this is why the startup script route is failing
0
 

Author Comment

by:johnbowden
ID: 24205498
yes, authenticated users are set there. R&E, List, Read
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24205526
try changing it from a .bat to .cmd
0
 

Author Comment

by:johnbowden
ID: 24205551
dstewartjr, I tried the vbs script and it fails with the following;

Script: C:\temp\updatehost.vbs
Line: 20
Char: 17
Error: Subscript out of range: '[number: 1]'
Code: 800A0009
Source: Microsoft VBScript runtime error
0
 

Author Comment

by:johnbowden
ID: 24262156
so I've created a GPO for the script to start up. In the start up properties, I've selected the following;
\\domain.local\SysVol\domain.local\scripts\HostsFile\updatehost.cmd
and saved the GPO.

On the Startup Properties Script tab, I click on 'Show Files' nothing shows up in that directory. That directory is as follows;
\\domain.local\SysVol\domain.local\Policies\{7508CA65-B810-44BD-8198-741751966E86}\Machine\Scripts\Startup

Should I be copying those two files (hosts file and updatehost.cmd) into that directory?
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24385140
You MUST post the solution that you arrived at.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Learn about cloud computing and its benefits for small business owners.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question