Another simple remote-control tool

Have you ever wanted to open a command prompt window on one computer and work at the command prompt of a computer elsewhere on the network? The Microsoft Windows NT Server 4.0 Resource Kit has some great tools that let you do from the command line what NT lets you do from only the GUI. For example, regular readers of this column know that Addusers lets you modify user accounts and group membership; Netdom lets you change a workstation's domain membership and create and destroy trust relationships; Dhcpcmd lets you control your DHCP server and scopes; Winscl administers a WINS server; Rmtshare creates, destroys, and modifies permissions on file shares; and Xcacls does the same for NTFS permissions.

However, most of these tools can control only the machine you run them on. If you want to use Netdom to move a workstation's membership from one domain to another, you must walk over to that workstation, sit down, and run Netdom locally. In addition, you might soon be running Netdom more often; it's the primary in-the-box tool for moving NT 4.0 resource domains into Windows 2000 (Win2K) organizational units (OUs). Therefore, running some of these tools remotely will be a real benefit.

A few months ago, I wrote about the resource kit's Telnet service. Telnet is a useful service, but it isn't secure. Someone sniffing network packets can intercept your password as you log on to the Telnet server. This month, I describe an alternative service that uses NT authentication: Remote Command (RCMD). This service has two parts: the server portion and the client portion. Microsoft includes the RCMD service with the server resource kit but not with the workstation resource kit. (I strongly recommend that you obtain Supplement Three of the resource kit.)

Microsoft built the server portion of RCMD as a standard NT service that consists of just two files: rcmdsvc.exe and oemnsvrc.inf. You can find these files in the directory you installed the resource kit in. To install the service, copy these two files to the \winnt\system32 directory of the server you want to control. Then, open the Network applet in Control Panel. Click the Services tab to show the network services (e.g., Server, DHCP), then click Add. After NT prepares its list of possible network services, you'll see the new option, Remote Command Server. Choose that option, then click OK. Control Panel will want to rebind the network services, so you'll need to reboot the system. Before you do, configure the Remote Command Server to start automatically. Close the Network applet, and open the Services applet. Scroll down the list, and you'll see that you now have a service called Remote Command Server. Click this entry, then click Startup. Choose Automatic to have the service start automatically when you boot.

After you reboot, look in the directory you put the resource kit files in for the program rcmd.exe. Copy this program to your workstation. (The resource kit license lets you copy resource kit files to all computers in one location.) You can use rcmd.exe in several ways. To run one command on a remote server, type

rcmd \\<servername> <command>

For example, the command

rcmd \\ignatz dir

opens a window and displays the entire \system32 directory from a remote server named Ignatz. As soon as the command is finished, the window closes. Typing

rcmd

causes the RCMD service to prompt you to enter the name of a server; type the name without the backslashes (e.g., Ignatz rather than \\Ignatz). A command window opens, and you can type in as many commands as you like. The command

exit

closes the window. After you exit, RCMD prompts you for another server name. Press Ctrl+C to shut off RCMD.

Microsoft maintains that you can perform every administrative task in Win2K from the command line. If you learn RCMD now, you'll be all the more ready for Win2K.

End of Article




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

Mark Minasi's This Old Resource Kit: "Remote Command" (October 1999) is a wonderful article about the Remote Command (RCMD) service for Windows NT. I recently set up this service on all my servers and find it very useful. Being able to jump to a command line and type net start to see what services are running or tlist to get a list of processes is convenient. One of the neat things that the author didn't mention in the article is that RCMD remembers the commands you enter on the RCMD line, even between server sessions. So, I can hop on one server, enter the Net Start command, exit, log on to another server, press that system's up arrow key, and recall the Net Start command. You can also press F7 to recall commands. RCMD is a great little tool--­and only network administrators can run it (another important point). Keep up the good work informing the NT administrators of the world about the useful tools in the Microsoft Windows NT Server 4.0 Resource Kit.

John A. Rolstead

I wonder if you could help me. I haven't really done any window's scripting before and have been looking into AT scripts. I would like to perform a simple AT script. I would like to copy an Arcserve Backup Log from a remote computer to my local computer at a specific time. Can you help - I'd like to impress my boss!!! Kind Regards.

Chris

I need to sync my window nt 4.0 server to my lan router. So the time that the server recieves comes from the router. And as a result the rest of my network receives its time from the server. Can you help me..

ronald hazelton

very good

balaji

Is there a way to restrict access to a server via the rcmd command. Here's a example: I have three servers that do code crunching and all programmers need to be local admins in order to submit there builds to these servers. 1 programmer is in charge of orchestrating the applications used to code crunch these builds. He uses rcmd to access these servers and I want to restrict the access to the domain admin, this particular programmers user account and a service account. Can this be done?

bryan

We are moving from NT to a Windows 2000 server and my RCMD no longer works and gets an "access denied". The reason given was: The Remote Command Service is using "NTLM" authentication and we are now using Kerberos in the Windows 2003 server world. Is there an equivalent "RCMD" in the Windows 2003 world?

Thanks.

Anonymous User

Is there a version of RCMD that will work from SQL Server?

Anonymous User

To answer the Anonymous user asking about a Windows 2003 version of RCMD, yes, there is one, it is simply REMOTE.EXE

Anonymous User

Article Rating 5 out of 5

Is there any utility that has the same syntax for RCMD in Windows 2003? The syntax is totally different for remote.exe. Please let me know if anyone's seen other options out there. Thanks!

Anonymous User

Article Rating 4 out of 5

 
 

ADS BY GOOGLE