I installed Qtum core in my Ubuntu 16.04 server and generated my wallet, and encrypted it.

For the test purpose, I changed the password using the command like below.

I typed below command to change my password.

./qtum-cli walletpassphrasechange "oldpassphrase" "newpassphrase"

Let's say my oldpassphrase is test and my new passphrase is test"

Notice that I type the double quotation mark right after the word test

./qtum-cli walletpassphrasechange "test" "test""

This returns below line that asks me to close the double quotation mark.


So I typed " to close it.

Surprisingly, the command line has passed!

I thought the new password would be test" or test""

But they both do not work.

Can anyone guess what the new password might be?


This is really a Bash question, but I'll bite.

Bash (or any UNIX shell) will treat " symbols as begin and end of a literal. Inside "", spaces and special characters inside that would otherwise have a special meaning are permitted.

One of the permitted special characters inside is the newline. That's exactly what's happening here. Your "test"" plus " on the next line is seen as "test" plus a newline between quotation marks. As a result, your new password is test plus a newline character.

If you would want test" as your password, one way would be to use single quotes instead of double quotes. One of the characters permitted inside single quotes is... the double quote character.

So you could use

walletpassphrasechange 'test' 'test"'
  • ./qtum-cli walletpassphrasechange "test" "test"" > ". If this command passed through, what do you think the new password might be? As you mentioned, test plus a newline character is not working. So far, I have tried test, test"", test\n, test"\n". They all don't work.
    – JayB Kim
    Nov 23 '17 at 10:33
  • Try $'test\n'. The $ in front tells the shell to interpret sequences like \n rather than take them literally. Nov 23 '17 at 15:32
  • i'll try that and let you know if it is right or not.
    – JayB Kim
    Nov 24 '17 at 0:22
  • wow! $'test\n'work! thank you so much!
    – JayB Kim
    Nov 24 '17 at 1:03
  • Can you elaborate a little more about how it is changed to $'test\n' ? I don't really get it..... "test""plus newline " becomes $'test\n' Now, i know $ sign tells the shell to interpret sequences like \n, but how this double quotation mark " changed to the single quotation mark ' and it is positioned right before the word test?
    – JayB Kim
    Nov 24 '17 at 1:34

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .