i solved this for my Node by following lines in the Bitcoin.cfg after i started the client ( not the QT) with
-rpcuser=mynamewhateveryounameit
and in the Config i wrote
Position of the Cookie = your Password)
rpccookiefile=D:\Bitcoin\wallet.cookie
allow not needed i guess for you are allways free to connect in your network but i did it anyway
rpcallowip=127.0.0.1
connection to the python proxy ( i use python-bitcoinrpc-master, much better then Python only
from bitcoinrpc.authproxy import AuthServiceProxy
And thats all for the reason that it soon will be impossible to set your password or Username in the Config file.
dont know why, but it is like it is
For the record, the script
rpcauth.pyonly works with python3. – Thalis K. – 2019-07-28T11:27:25.880Also you can give the password to
rpcauth.pyyourself by running it aspython3 /path/to/rpcauth.py myusername -. The final-means the script will prompt you for the password. Works with bitcoin-core v0.18. – Thalis K. – 2019-07-28T11:33:33.0531I tried to do this, but when I removed rpcuser and rpcpassword from bitcoin.conf I started to get this message: No rpcpassword set - using random cookie authentication Generated RPC authentication cookie. I added rpcauth generated by rpcuser.py but it doesn't seem to recognize it. What am I missing? – hsmiths – 2018-01-13T20:22:07.173
@hsmiths You can use the randomly generated cookie file in the bitcoin data directory, or you can add an rpcauth line to bitcoin.conf. Not sure why the rpcauth line isn't recognized. I've used it in the past. – Kalle – 2018-01-15T02:19:31.140
@hsmiths Yor message 'No PRC password set...' is actually a message that says cookie auth is working. – Willtech – 2018-01-29T10:54:43.437
1This doesn't actually describe how to use "cookie-based" authentication. Instead it describes how to use "rpcauth", which was not the question. This should not be the "accepted" answer. – chrisarnesen – 2018-11-15T04:10:42.217