Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon client machines from server?

Status
Not open for further replies.

Compositor

Technical User
Nov 8, 2005
29
GB
I am a network administrator for a medium sized primary school. We are running a Windows 2000 server on a domain with Windows XP clients. Our lower year groups all login using 1 username and password (eg. year 3 login with the username year3 and the password year 3).

As the children would take forever to login on their own, we tend to login the clients before they arrive so that they can start work right away but at the moment I have to go around each client machine logging them in one at a time.

Is there a way of logging in all of the machines at once with a certain username and password from the server?

Any help would be hugely appreciated!
 
You can set the machines up to automatically login using stored credentials. You could also set restrictions so that the "year 3" user can only login in on certain named workstations and restrict the login hours for that user account.

Auto-login is covered in the XP forum within this FAQ:
 
Thanks for getting back so quickly and for the suggestions.

Is there any way that I could have a script that when run, logs all of the machines in as year 3 and another that when run logs all the machines in as year 4 etc?

Is there any software that does this?

 
Assuming they are logging into a W2k or above server you can either assign logon script in their user profile or set up Policies for the user in AD.

Logon scripts is a LOT easier to pick up as long as you understand .BAT files (they can be .vbs files as well.

There's lots of help on scripts and policies on the net but if you have a specific issue ask again!

 
Thanks again for getting back so soon.

I am still a bit confused. Can you maybe explain how you use logon scripts to actually log a machine in with a certain user/pass?

This is a simplified system that I am after.....

If you had a Windows 2000 server and 2 Windows XP pro clients connected to it, is there a way of logging all the clients on at the same time, with the same user/pass, FROM THE SERVER without having to go around and type a user/pass into each machine one by one?
 
Logging in is controlled by the msgina.dll. If you use netware to login, this can be replaced by nwgina.dll. To do what you want would require a way to control the msgina.dll or replace it with a custom version. I do not know that this has ever been done.

The only other way to automate this would be scripting a remote control program. I know NetOp can do scripted remote control sessions but could not tell you how to write this particular script.

The best way to automate this would be using an organic machine. They are harder to program but is possible. I would think you have up to 3 models available:
Teachers
Student Volunteer
Each individual student

It may take them a while at first but they will get better at it. You could also make the argument that you are doing them a disservice by doing it for them. There comes a time when you stop tying their shoes for them, so why keep doing this?
 
OK, just thought of one more option:

Do not change the login. You could create a script that would just change the settings for the different classes. The script could change the desktop, move icons, change drive mappings, change the wallpaper to indicate the current setup.

I still stand by what I wrote about them learning it for themselves, but this would be another option if you really need to do something like that.
 
Also what you can do is create a deployment app or batch(.bat) file that will create a registry entry for autoadminlogon and autoadminpassword which are under the HKLM\Software\Microsoft\Windows\Logon I think. Here you can specify a username and password to autologon as.

Check out our website
 
yes, you could do this with a series os vbscripts.

Your first step will be to create a script to write to the registry. This will set the default user name and default password. You will then need a second script that reboots all of the PCs remotely.

To enable auto logon in Windows 2000/XP with a domain system, you need to edit the registry. Start Regedt32.exe and locate the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon; Enter your domain name, account name, and password, using the following values : DefaultDomainName, DefaultUserName, and DefaultPassword. (NOTE: The DefaultDomainName and DefaultUserName values may already exist.) .

If the DefaultPassword value does not exist, create it. To do so: On the Edit menu, click Add Value; In the Value Name box, type DefaultPassword; In the Data Type box, click REG_SZ.; Click OK; In the String Editor box, type your password. Click OK and save your changes. (NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false). This disables the AutoAdminLogon feature. This behavior also occurs if the DefaultPassword string is specified but the password is left blank or null.)

Refer to the following for sample code on how to write to the registry remotely. Note that in the sample it uses "." for the computer name. Replacing the "." with the name or IP of a remote system will force the edit on that system. Refer to my FAQ faq329-4871 for information on how to convert that script to hit multiple PCs.

Your next task is to then reboot the PCs remotely. This is a very simple task.

the following script just needs a text list of PC names to reboot them remotely.

Code:
'==========================================================================
'
' NAME: RebootWSfromList.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE  : 7/6/2004
'
' COMMENT: <comment>
'
'==========================================================================

On Error Resume Next

'open the file system object
Set oFSO = CreateObject("Scripting.FileSystemObject")
set WSHShell = wscript.createObject("wscript.shell")
'open the data file
Set oTextStream = oFSO.OpenTextFile("wslist.txt")
'make an array from the data file
RemotePC = Split(oTextStream.ReadAll, vbNewLine)
'close the data file
oTextStream.Close
For Each strComputer In RemotePC
	Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" & strComputer).ExecQuery("select * from Win32_OperatingSystem where Primary=true")
		for each OpSys in OpSysSet
			OpSys.Reboot()
 		next
Next






I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top