0

I tried in PHP via SSH to generate password with the command dovecotpw and if the password contains the $ sign symbol than it generates different hash from the hash the dovecotpw generates in command line.

here is the line that generates the password:

echo $ssh->exec('dovecotpw -s CRAM-MD5 -p test$test');
TooCooL
  • 20,356
  • 6
  • 30
  • 49

1 Answers1

1

The remote shell is using the $ to denote a shell variable. Escape the argument.

...('... \'test$test\'');
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • Yeah now I understand what is going on.. thank you I am going to accept your answer because problem solved – TooCooL Dec 23 '13 at 22:01