Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- plink removes quote marks
- Derrin Chong
November 27, 2003, 3:52 am
rate this thread
I'm trying to run the following command.
plink -load 'OG' -l joe.staff sudo /usr/local/sbin/disable-account
joetest --service 'dialup flat' --reason 'abuse'
The 'OG' putty config has the default values except that local echo is
forced off to hide the sudo password. When I check the sudo log on the
server, the command is being called with the quotation marks removed.
/usr/local/sbin/disable-account joetest --service dialup flat --reason abuse
So disable-account won't run because it's expecting the --service option
argument to be quoted.
Anyone know how to fix this?
Re: plink removes quote marks
You could try creating a temporary file with the commands in it,
suitably escaped, like:
sudo /usr/local/sbin/disable-account joetest --service \"dialup flat\"
Then use plink's -m parameter:
plink -load 'OG' -l joe.staff -m tempfile.txt
Maybe someone else will have a better method... I doubt it's plink
stripping the quotes out, so much as it is the Windows command interpreter.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum