Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-09-2009, 07:44 PM   #1
LQ Newbie
Registered: Nov 2004
Location: South Carolina
Distribution: CentOS 5.3; RHEL5.4
Posts: 24

Rep: Reputation: 15
How to Shutdown Windows XP Computers with a Linux Server

As a budget cutback, our school administrators asked us to shutdown all non-essential classroom computers at night to save electricity. I teach Linux in a classroom that has a Dell Poweredge 2850 Red Hat Enterprise Linux (RHEL5) server and 29 Dell Optiplex 745 student lab computers running Microsoft Windows XP SP3 as the host operating system and VMWare Server to provide virtual Linux machines for our classes. I researched on the Internet for the best solution to remotely shutdown the student lab computers at night. I was not able to find one post or how-to that completely answered my questions, but I was able to piece together a solution. In an effort to document this project and help others with similar needs, here are my notes on the project:

  1. Disable Simple File Sharing. UNCHECK "Use simple file sharing" under My Computer > Tools > Folder Options > View.
  2. Check the Windows Firewall and make sure ICMP is enabled and File and Printer Sharing is enabled. Go to Control Panel > Security Center > Windows Firewall > Exceptions > CHECK "File and Printer Sharing". Also on the Advanced tab > ICMP Settings > CHECK "Allow incoming echo request".
  3. You must be able to successfully ping the IP address of the remote Windows XP computer you want to shutdown.
  4. The default Local Policy in Windows XP to force a remote shutdown is limited to members of the Administrator group. If you want to change this, use the Group Policy Editor (gpedit.msc) to change this Local Policy. Select Computer Configuration > Windows Settings > Security > Local Policies > User Rights Assignment > Force shutdown for a remote system and change the properties to include the user or group you want to have this authority.

  1. Samba must be installed and working properly. In our subnet, the RHEL5 Samba Server is configured as a WINS server for our own separate workgroup.
  2. It is recommended that the DHCP server be setup to assign static IP addresses to the Windows XP computers. This makes control of the lab computers much easier.
  3. It is also recommended that BIND be setup with a zone file for the subnet to provide DNS resolution for the computers in the lab subnet.
  4. The following command will remotely shutdown a Windows XP computer under this scenario:

    net rpc SHUTDOWN -C "enter a comment to display at shutdown" -f -I x.x.x.x -U username%password
    In this example x.x.x.x is the IP address of the remote Windows XP computer, username is a member of the Administrator group on the Windows XP machine, and password is the correct password associated with the username.
  5. Test your configuration. Samba is very good about letting you know if you command works correctly or if you have problems.
  6. Next create a script to shutdown the Windows XP machines. Use crontab to schedule when you want the remote machines shutdown.

Originally posted at
Old 06-09-2009, 07:55 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
You might want to submit this for the "Tutorials" section of the site. This seems like it is something that people might be interested in later on, and things tend to get lost on the boards.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
no ability to see samba server on windows computers linux hates me Linux - Server 2 06-04-2009 04:00 AM
Two computers to one printer,one of them windows and one Puppy Linux and Windows 2000 birdbrained Linux - Newbie 1 11-09-2007 12:29 PM
Printing to a cups samba server on slackware from windows computers Jared Lewis Linux - Networking 1 06-10-2005 02:55 PM
Spotting Windows Computers from a Linux server Tonks27 Linux - Newbie 6 12-02-2004 10:28 AM
How to connect two computers one with Windows and other with Linux? dineshjk Linux - Networking 2 05-10-2004 09:00 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration