rpcauth command line arg does not work when there is no config file #20057

issue bijeebuss opened this issue on October 1, 2020
  1. bijeebuss commented at 5:29 PM on October 1, 2020: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    Expected behavior

    specifying the command line arg -rpcauth={user}:{salt}${hash} from the output of rpcauth.py should allow you to authenticate with the user and password even when there is not a config file

    Actual behavior

    rpc command returns error: Authorization failed: Incorrect rpcuser or rpcpassword

    To reproduce

    run bitcoind version 0.20.1 with the command line arg -rpcauth={user}:{salt}${hash} from the output of rpcauth.py without creating a bitcoin.conf file. Then try to connect to the rpc with the username and password.

    System information

    bitcoind version 0.20.1 for linux downloaded from the website OS: ubuntu

  2. bijeebuss added the label Bug on Oct 1, 2020
  3. bijeebuss commented at 5:31 PM on October 1, 2020: none

    if you then add a config file with rpcauth={user}:{salt}${hash} it works

  4. adaminsky commented at 4:27 AM on October 3, 2020: contributor

    The comment here #12209 (comment) about the dollar sign being consumed by the shell was the problem for me. To fix this, I just added a '\' before the dollar sign in the rpcauth argument to bitcoind. I think this should ideally create a warning message if the rpcauth argument is not properly formatted.

  5. bijeebuss commented at 8:56 PM on October 3, 2020: none

    That would most likely explain it, thanks.

  6. bijeebuss closed this on Oct 3, 2020

  7. DrahtBot locked this on Feb 15, 2022
Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-03 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me