Find the answer to your Linux question:
Results 1 to 5 of 5
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 ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Location
    South Carolina
    Posts
    5

    How To Shutdown Windows XP Computers from 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:

    REQUIREMENTS FOR WINDOWS XP TO BE REMOTELY SHUTDOWN BY A LINUX SERVER:

    Disable Simple File Sharing. UNCHECK "Use simple file sharing" under My Computer > Tools > Folder Options > View.

    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".

    You must be able to successfully ping the IP address of the remote Windows XP computer you want to shutdown.

    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.

    REQUIREMENTS FOR THE LINUX SERVER TO REMOTELY SHUTDOWN WINDOWS XP COMPUTERS:

    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.

    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.

    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.

    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.

    Test your configuration. Samba is very good about letting you know if you command works correctly or if you have problems.

    Next create a script to shutdown the Windows XP machines. Use crontab to schedule when you want the remote machines shutdown.

    This thread was originally posted at blog.beausanders.com.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,955
    Well, the Cygwin environment provides a shutdown command which will shutdown and/or reboot a Windows system just fine. If you install Cygwin on your Windows PC's, then you can remotely execute that process from your Linux server I would think. Then specifics of doing that need to be determined, but it should not be difficult. As for a native Windows shutdown capability, I really don't know how to do that, though I would think it should also be possible.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Location
    South Carolina
    Posts
    5
    Thanks for the suggestion, Rubberman.

    -Beau

  4. #4
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by BeauSanders View Post
    REQUIREMENTS FOR WINDOWS XP TO BE REMOTELY SHUTDOWN BY A LINUX SERVER:

    Disable Simple File Sharing. UNCHECK "Use simple file sharing" under My Computer > Tools > Folder Options > View.

    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".
    Can you elaborate _why_ ?

    Also, this is very useful information. Why don't you post it to either 'Articles' section or to 'HOWTOs' section. Its easier to track it there than if it is in 'Coffee Lounge' where it will get lost... Even those few who _search_ do not usually search in coffee lounge. Ask mods, they may help you.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Location
    South Carolina
    Posts
    5
    Thanks for the reply, Saivin. I will post to the how-tos as suggested.

    As for the Windows requirements, that is the result of hours of trial and error. I can tell you that "Simple File Sharing" restricts many other features normally enabled in Windows XP. I usually disable it whenever installing.

    -Beau

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •