[Samba] any plans on getting psexec / cmdat equivalent to Samba?
devzero at web.de
Fri May 26 22:39:45 GMT 2006
If anybody want`s to implement the psexec unix port or samba equivalent,
maybe taking a look at xCmd from Zoltan Csizmadia at
may help a LOT and is a very good example. (This one seems to work similar
like psexec - but it is available with sourcecode!)
I don`t know if the author is still reachable via this mail adress or if
there is any chance to get some help with "creating the xCMD/psexec
equivalent for linux", but I CC'ed him with this mail to say "thank you for
making it and for providing the source".
Subject: [Samba] any plans on getting psexec / cmdat equivalent to Samba?
From: Tomasz Chmielewski <mangoo () wpkg ! org>
Date: 2006-03-22 11:00:23
Message-ID: 44212E47.4040300 () wpkg ! org
[Download message RAW]
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
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
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?
More information about the samba