USING YOUR DD-WRT ROUTER TO SHUTDOWN A REMOTE WINDOWS SYSTEM

From DD-WRT Wiki

Jump to: navigation, search

[edit] USING YOUR DD-WRT ROUTER TO SHUTDOWN A REMOTE WINDOWS SYSTEM

This is take from this thread: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=57651

REQUIREMENTS FOR A DD-WRT ROUTER:

1. Install Optware: http://www.dd-wrt.com/wiki/index.php/Optware http://www.dd-wrt.com/wiki/index.php/Optware-ByHand

2. Install Samba on your router ipkg-opt --force-depends install samba

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

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.

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

1. Samba must be installed and working properly.

2. It is recommended that the DHCP server be setup to assign static IP addresses to the Windows XP computers.

3. It is also recommended that BIND be setup with a zone file for the subnet to provide DNS resolution for the computers in 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 your 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.

Thanks to user pauldmis for compiling the info from the thread.

http://pckeeper.zeobit.com

Computer Slow