user29395: The host system is Linux Debian Stretch (9 / testing).
The Bitcoin Core package for Linux I have just downloaded and verified and installed.
I have created the following file:
/home/myUsername/.bitcoin/bitcoin.conf

With contents:
listen=1
server=1
rpcuser=myUsername
rpcpassword=myPassword
rpcport=8332
rpcconnect=127.0.0.1

Then I have punched the following holes to my firewall:
sudo iptables -A INPUT -p tcp -m tcp --dport 8333 -m comment --comment "Bitcoin Listen" -j ACCEPT

sudo iptables -A INPUT -p tcp -m tcp --dport 8332 -m comment --comment "Bitcoin RPC" -j ACCEPT

And forwarded the 8333 port from my router to the server.
I am unsure whether the second hole is necessary for RPC connections, but that's not the question now.

If I now run the following command as my regular user:
bitcoind -daemon -datadir=/raid1a/bitcoind/

It says:

Bitcoin server starting


I wait for a few minutes for it to initialize and then invoke:
bitcoin-cli getinfo

With the result:

error: incorrect rpcuser or rpcpassword (authorization failed)


I have a very long and complex password, could that be the pickle?
The debug log says only:

ThreadRPCServer incorrect password attempt from 127.0.0.1:someport



user29395: Despite I run both bitcoind and bitcoin-cli as the same user, it for some reason fails to find my personal config file located in standard location:
$HOME/.bitcoin/bitcoin.conf

So I have set up an alias:
bitcoind -daemon -datadir=/raid1a/bitcoind/ -conf=/home/user/.bitcoin/bitcoin.conf

Case solved.

29395: <p>The host system is Linux Debian Stretch (9 / testing).</p>

<p><a href="https://bitcoin.org/en/download" rel="nofollow noreferrer">The Bitcoin Core package for Linux</a> I have just downloaded and <a href="https://security.stackexchange.com/a/124323/82570">verified</a> and <a href="https://bitcoin.org/en/full-node#other-linux-distributions" rel="nofollow noreferrer">installed</a>.</p>

<p>I have created the following file:</p>

<pre><code>/home/myUsername/.bitcoin/bitcoin.conf
</code></pre>

<p>With contents:</p>

<pre><code>listen=1
server=1
rpcuser=myUsername
rpcpassword=myPassword
rpcport=8332
rpcconnect=127.0.0.1
</code></pre>

<p>Then I have punched the following holes to my firewall:</p>

<pre><code>sudo iptables -A INPUT -p tcp -m tcp --dport 8333 -m comment --comment "Bitcoin Listen" -j ACCEPT

sudo iptables -A INPUT -p tcp -m tcp --dport 8332 -m comment --comment "Bitcoin RPC" -j ACCEPT
</code></pre>

<p>And forwarded the 8333 port from my router to the server.</p>

<p>I am unsure whether the second hole is necessary for RPC connections, but that's not the question now.</p>

<hr>

<p>If I now run the following command as my regular user:</p>

<pre><code>bitcoind -daemon -datadir=/raid1a/bitcoind/
</code></pre>

<p>It says:</p>

<blockquote>
<pre><code>Bitcoin server starting
</code></pre>
</blockquote>

<p>I wait for a few minutes for it to initialize and then invoke:</p>

<pre><code>bitcoin-cli getinfo
</code></pre>

<p>With the result:</p>

<blockquote>
<pre><code>error: incorrect rpcuser or rpcpassword (authorization failed)
</code></pre>
</blockquote>

<p>I have a very long and complex password, could that be the pickle?</p>

<p>The debug log says only:</p>

<blockquote>
<pre><code>ThreadRPCServer incorrect password attempt from 127.0.0.1:someport
</code></pre>
</blockquote>
 29395: <p>Despite I run both <code>bitcoind</code> and <code>bitcoin-cli</code> as the same user, it for some reason fails to find my personal config file located in standard location:</p>

<pre><code>$HOME/.bitcoin/bitcoin.conf
</code></pre>

<p>So I have set up an alias:</p>

<pre><code>bitcoind -daemon -datadir=/raid1a/bitcoind/ -conf=/home/user/.bitcoin/bitcoin.conf
</code></pre>

<p>Case solved.</p>
