[Samba] any plans on getting psexec / cmdat equivalent to Samba?

Tomasz Chmielewski mangoo at wpkg.org
Wed Mar 22 11:00:23 GMT 2006


Windows admins can make their work easier with a tool like psexec.

It allows to execute commands remotely, without the need to install 
anything on the target machine. All that is needed is username/password 
of course.

Unfortunately, psexec command only runs on Windows.

The usage is as follows (we start notepad interactively with -i to show 
that something happens):

psexec \\192.168.1.2 -i -u username -p password notepad

It waits for the command to complete, and returns its exit code, so can 
be used within scripts.


A similar tool we can use with Samba is cmdat, which comes together with 
   samba-tng (one just needs to compile samba-tng, and then can use the 
tool with a "regular" Samba).

To start a command on a remote system, we can use (we start notepad 
interactively with /interactive to show that something happens):

cmdat -I 192.168.1.2 -U 'username%password' -c 'at now /interactive 
notepdad'

Unfortunately, it uses at to start commands (1 minute from the current 
time when we use "now"), so we know nothing about the status of the 
running command, nor get any exit code. In other words, it's close to 
impossible to use it in scripts to do anything useful (other than 
starting single commands).


Is any work done in Samba to get a tool similar to psexec?


-- 
Tomasz Chmielewski
http://wpkg.org


More information about the samba mailing list