Bitcoin Forum
June 15, 2024, 12:14:39 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Authorization failed: Incorrect rpcuser or rpcpassword  (Read 146 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
April 29, 2021, 05:02:43 PM
 #1

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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6897


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 29, 2021, 05:15:13 PM
 #2

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

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
April 29, 2021, 05:26:14 PM
 #3

If you use the password in the .cookie file instead of writing your password on the command line

Use it where and how?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
NotATether
Legendary
*
Offline Offline

Activity: 1638
Merit: 6897


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 29, 2021, 06:10:19 PM
 #4

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=<long hex string inside the .cookie file> and remove the stuff from your config file since the .cookie file is autogenerated at runtime.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
April 29, 2021, 06:24:24 PM
 #5

Instead of --rpcuser=test123456 --rpcpassword=123456, write --rpcuser=__cookie__ --rpcpassword=<long hex string inside the .cookie file> and remove the stuff from your config file since the .cookie file is autogenerated at runtime.

Yes, it works! Thank you.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4200
Merit: 8440



View Profile WWW
April 30, 2021, 02:58:06 AM
 #6

Your bitcoin.conf configured rpcpassword likely had non-permitted characters (such as #) and so it was getting ignored.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!