Learn how to a build a cloud-first strategyRegister Now


How to cause a remote computer to login?

Posted on 2010-08-25
Medium Priority
Last Modified: 2012-05-10
I'm looking for a way to script the remote login of multiple computers.  Note, I don't want remote desktop or terminal services--I want the computer itself to become logged in remotely.  

What I'm trying to do is allow a teacher of younger grades (K-2) to automatically log in 25 computers into the same user account, without having to key in a login on each machine and without revealing the password to the account to the students.  The computers are used by other users with other accounts that should not have access to the K-2 accounts, so having them constantly auto-login is not an option.  

I need to be able to do this without a reboot.  I've looked at a solution that uses PSExec or Reg to change the registry to autologin, and then reboots the computers, then changes them back and reboots when finished.  This would be great, but because we use state control with Faronics DeepFreeze, a reboot is not an option for my environment.  

A command line tool that takes a username and password parameter and causes a remote computer to login using that username and password would be ideal.  

I can live with having the credentials pass through the network in plain text.  

Workstations are XP, authenticating against Windows Server 2003 Standard (soon to be upgraded to 2008)  Any suggestions much appreciated.  


Question by:scotru
LVL 40

Assisted Solution

by:Richard Quadling
Richard Quadling earned 400 total points
ID: 33526925
There is a tool (TweakUI amongst others), which allows you to set the login username and password.

http://support.microsoft.com/kb/315231 also has the same sort of info.

But please note ...

"Important If you turn on autologon, using Windows XP becomes more convenient. However, using this feature can pose a security risk."

You can set the registry remotely (assuming you have permissions - if not get that setup first).

But this only becomes active after a reboot and during boot up.

But once enabled, you could turn it on/off remotely easily enough by remote registry editing.

I can't quite work out how you want this to work though.

You can't have 2 users active on the same machine, so the first user needs to be logged out. Rebooting with the autologin is a clean way.

Once they've logged in, you disable the autologin.

At the end of the class/session, reboot again to give back the normal login box.


Expert Comment

ID: 33527130
Since you have Active Directory:

The Script can be applied to an OU of the specific machines and execution time,
And use a log-off script to logoff-all the machines.

Author Comment

ID: 33527732
Thanks for the comments.  DeepFreeze is a virtualization product that restores the computer system to a default state on every reboot.  Therefore, options like TweakUI that require a reboot won't work in this case, as any changes I made prior to the reboot to the registry will be lost  since the machine is in a frozen state.  

@Nabil, I don't think the AD based solution will work here either since I don't wont the machines to always auto login, only at specific times when prompted by executing something on another machine (teacher's machine).  Otherwise, older students would be able to access the accounts used by the younger students by simply rebooting the machines and get anonymous access to the networks.  What we want is not so much autologin as scriptable remote login.
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

LVL 23

Accepted Solution

Danny Child earned 800 total points
ID: 33529981
DeepFreeze also offer their DataIgloo product for customising user profiles, allowing certain registry entries to survive reboots, etc:

Expert Comment

ID: 33530064
This dosent solve the problem, he cant have the machines auto logon, i will come back with a sloution in an hour.

Expert Comment

ID: 33531273
Remote execute this application with the correct parameters:

Expert Comment

ID: 33531352
Also you can schedule (task scheduler) it to run at the time k2 kids come in the IT room.
[This involves modifying the DeepFreeze configuration though]

I would stick to PSexec and the tool i provided though.

Author Comment

ID: 33539053
Thanks so much for all the comments.  

@Geek_Nabil,  I actually had tried that utility already, but couldn't get anything but error messages from it.  Have you gotten it to work?  When I couldn't get it to work, I kind of assumed it didn't support XP.  

@Dan_ch99, I had not seen this Igloo product.  This might very well do the trick (and may help me with another problem I'm having).  

However, I think we actually stumbled across an alternative solution that will work very well for our situation.  We have a product called LanSchool that among other things allows remote control of computers.  What I didn't realize is that I can use it to remote multiple computers simultaneously, and it works as a service, so I can use it to login all the machines simultaneously.  It's pretty slick. (http://www.lanschool.com/)

I'd still be interested if anyone runs across a cleaner way to do a remote login--but I think this will solve our immediate problem.  

Thanks again for all the help.  


Assisted Solution

Geek_Nabil earned 800 total points
ID: 33539763
LanSchool is a Solid Solution i second that you get it, never the less this is how you perform the remote login:

Create a folder on the teachers desk for example:

Create a 'lab.txt' file with notepad containing all the computer names, and save it the the Folder 'RemoteLogin':

Copy the application 'login.exe' 'PSexec.exe' to the folder 'RemoteLogin'

Create a batch file named 'r-login.bat':
REM PSexec @lab.txt -c -d -e -f -p <PID> -u <UID> logon.exe -u <USER> -p <PASSWORD>
 PSexec @lab.txt -c -d -e -f -p Passw0rd -u Domain\Admin logon.exe -u user -p password

-u <UID>  - An administrative "domain\user" account. [Must have Administrator Privileges on the clients]
-p <PID> - The password for the "domain\user" account.
-c            - Copy the specified program to the remote system for execution.
-d            - Don't wait for application to terminate. [You Don't Need to Wait]
-e            - Does not load the specified account's profile. [Loading the Profile is unnecessary]
-f             - Copy the specified program to the remote system even if it exists

-u <USER>                - the user-name to be logged in
-p <PASSWORD>   - the password of the user

Author Comment

ID: 33650949
Sorry, I'm on vacation and haven't got a chance to test this yet.  Prior the login.exe was just giving me error messages--but I'll test this as soon as I get back and report back on the results.  

LanSchool is working well for us right now as a solution.

Author Comment

ID: 34028064
I wasn't able to get the login.exe to run with Windows 7.  LanSchool solution solved the problem for me, but I'll split the points.

Thanks to everyone for your comments!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

810 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