3

On Ubuntu, how come Tor (0.2.4.20-1) doesn't create control_auth_cookie anywhere on the system after enabling CookieAuthentication in /etc/tor/torrc?

# /etc/init.d/tor start
* Starting tor daemon...                                             [ OK ]
# tail -n 2 /var/log/tor/log
Nov 24 14:09:06.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Nov 24 14:09:06.000 [notice] Bootstrapped 100%: Done.
# grep "\(DataD\|Cook\)" /etc/tor/torrc
DataDirectory /var/lib/tor
CookieAuthentication 1
  • What makes you think it hasn't? Where did you look for the cookie? How did you enable CookieAuthentication (what value did you set it to)? – Sam Whited Nov 24 '14 at 15:54
  • I did a find / -name "control_auth_cookie". I enabled it by uncommenting CookieAuthentication 1. – Mark Boulder Nov 24 '14 at 20:43
  • Could you edit your post and insert the output of grep "\(DataD\|Cook\)" /etc/tor/torrc? – Jens Kubieziel Nov 25 '14 at 8:56
  • @JensKubieziel all done! – Mark Boulder Nov 25 '14 at 10:41
  • So there should be a file in /var/lib/tor/control_auth_cookie. I tested it locally and it worked fine. Has the logfile some hints if something went wrong? – Jens Kubieziel Nov 26 '14 at 20:34
2

Your Tor is probably under the impression that it has already created one. (Maybe it did and you deleted it?)
Try the following:

  • Edit your torrc to set CookieAuthentication to 0
  • reset your Tor (kill -HUP or hit x twice in Arm)
  • Edit your torrc again to set CookieAuthentication back to 1
  • reset your Tor again.

You should now have a new control cookie.

Make sure you have a ControlListenAddress and/or ControlPort set.

  • Tried again with Debian this time. Still nothing. – Mark Boulder Feb 14 '15 at 21:06
0

If you're using the package from universe/net, the /usr/share/tor/tor-service-defaults-torrc file overrides the cookie location to /var/run/tor/control.authcookie. You should be able to find it there, or you can override that setting by adding the following line to /etc/tor/torrc:

CookieAuthFile /var/lib/tor/control_auth_cookie

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.