Author

Topic: Authorization failed: Incorrect rpcuser or rpcpassword (Read 173 times)

staff
Activity: 4326
Merit: 8951
Your bitcoin.conf configured rpcpassword likely had non-permitted characters (such as #) and so it was getting ignored.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Instead of --rpcuser=test123456 --rpcpassword=123456, write --rpcuser=__cookie__ --rpcpassword= and remove the stuff from your config file since the .cookie file is autogenerated at runtime.

Yes, it works! Thank you.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
If you use the password in the .cookie file instead of writing your password on the command line

Use it where and how?

Instead of --rpcuser=test123456 --rpcpassword=123456, write --rpcuser=__cookie__ --rpcpassword= and remove the stuff from your config file since the .cookie file is autogenerated at runtime.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
If you use the password in the .cookie file instead of writing your password on the command line

Use it where and how?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
If you use the password in the .cookie file instead of writing your password on the command line, and remove the rpcuser and rpcpassword entries from your bitcoin.conf, does it work then?

Some other useful information:

The problem is that bitcoind uses the cookie not the password from the config.

I put a std::cout in RPCAuthorized() in httprpc.cpp
std::cout << strUserPass << "\n" << strRPCUserColonPass<<"\n";

The output is:

REPLACED:REPLACED
__cookie__:0723ef24069e50123146dca0d76488bb0583781fc55e254b78be93eaf2764745
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
For some reason, once I enter the following command on the terminal I get this error:
Code:
angelo@angelopc:~/Desktop/bitcoin/bin$ ./bitcoin-cli --testnet --rpcuser=test123456 --rpcpassword=123456 --netinfo
error: Authorization failed: Incorrect rpcuser or rpcpassword

The thing is that these are the correct credentials, I haven't made any mistakes. Here's my bitcoin.conf:
Code:
server=1
listen=1
daemon=1
txindex=1
rpcuser=test123456
rpcpassword=123456

What is going on? FYI, the configuration file is located on an external drive, while the binaries of Bitcoin Core are on my internal SSD.
Jump to: