TooCooL
TooCooL

Reputation: 21202

dovecotpw returns different hash when used the $ symbol

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');

Upvotes: 0

Views: 105

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799330

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

...('... \'test$test\'');

Upvotes: 1

Related Questions