1

I am using Fedora linux with system installed TOR and Tor Browser 7.0.1. I first did

export TOR_CONTROL_PASSWD='"secret"'

and edited /etc/tor/torrc to the new password by adding the line

HashedControlPassword 16:C00D0BBA106618AF6014B12230735F6BE934D897193B76D6029CBE68E6

that was generated with tor --hash-password secret, then I restarted TOR.

Using Netcat, doing nc 127.0.0.1 9051

authenticate "secret"
250 OK

this means the password is correctly set to secret.

But when I try launching TOR Browser in the same terminal where I exported the variable with the password I am unable to use the TOR Button which complains that TOR is not running. (I set extensions.torlauncher.control_port to the correct port, 9051)(By default, Tor Browser uses secret as password)

Looking at the tor logs with journactl -fu tor it shows the following:

fedora Tor[16957]: New control connection opened from 127.0.0.1.
fedora Tor[16957]: Bad password or authentication cookie on controller.
fedora Tor[16957]: New control connection opened from 127.0.0.1.
fedora Tor[16957]: Bad password or authentication cookie on controller.

My torrc is this:

ControlSocket /run/tor/control
ControlSocketsGroupWritable 1
CookieAuthentication 1
CookieAuthFile /run/tor/control.authcookie
CookieAuthFileGroupReadable 1
ControlPort 9051
HashedControlPassword 16:C00D0BBA106618AF6014B12230735F6BE934D897193B76D6029CBE68E6

What am I doing wrong here?

4
  • What does nc 127.0.0.1 9051 <<< "PROTOCOLINFO" give you?
    – cacahuatl
    Jun 22, 2017 at 22:31
  • The " at export TOR_CONTROL_PASSWD='"secret"' seem unnecessary.
    – Jens Kubieziel
    Jun 23, 2017 at 21:28
  • It needs to be kept in double quotes, that's how I'd expect it to look. Otherwise it's interpreted as a cookie by the control port (since it'd be sent verbatim without the quotes).
    – cacahuatl
    Jun 23, 2017 at 22:40
  • @canonizingironize 250-PROTOCOLINFO 1 250-AUTH METHODS=COOKIE,SAFECOOKIE,HASHEDPASSWORD COOKIEFILE="/run/tor/control.authcookie" 250-VERSION Tor="0.2.9.10" 250 OK Jun 24, 2017 at 4:11

1 Answer 1

-1

Tor Browser sets its own hashed control password on the command-line, overriding the torrc. You can set the TOR_CONTROL_PASSWD environmental variable instead: https://trac.torproject.org/projects/tor/wiki/TorBrowserBundleSAQ

The Tor manual might also be helpful: https://www.torproject.org/docs/tor-manual.html.en

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .