• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

How to cause a remote computer to login?

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.  


3 Solutions
Richard QuadlingSenior Software DeveloperCommented:
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.

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.
scotruAuthor Commented:
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.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Danny ChildIT ManagerCommented:
DeepFreeze also offer their DataIgloo product for customising user profiles, allowing certain registry entries to survive reboots, etc:
This dosent solve the problem, he cant have the machines auto logon, i will come back with a sloution in an hour.
Remote execute this application with the correct parameters:
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.
scotruAuthor Commented:
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.  

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
scotruAuthor Commented:
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.
scotruAuthor Commented:
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now