Switch from root to user = su usrname >Password. The problems start when I try and su to debian-tor. First I get a query for a password which it doesn't have. So I make a pass for debian-tor and enter it when I su to debian-tor. I enter whoami and the response is: user and not debian-tor. With or without a password it doesn't work. Secondly, if I su debian-tor >passwrd - sudo -u debian-tor nyx it produces a page and a half of pure gibberish. Sudo -i to root and enter nyx, it operates perfectly; and yes I understand I shouldn't run nyx as root.

How do I become debian-tor so I can operate my bridge correctly?

  • Yours look different because you changed the setting of debian-tor as you mentioned in your post.
    – Algo7
    Apr 20, 2020 at 8:44

2 Answers 2


debian-tor is an service account (group) created by Tor during installation. It has it's shell acces set to /bin/flase which means you'll be logged out immediately when trying to login using it.

You can check it by typing sudo cat /etc/passwd | grep debian-tor

So what you have to do is to add the default user, for example ubuntu in Ubuntu operating system, to the debian-tor group. You can do it by typing sudo usermod -a -G debian-tor your_default_user

After this you'll have to edit the torrc file and add the line CookieAuthFileGroupReadable 1 and DataDirectoryGroupReadable 1in the file.

Then you'll have to restart tor, log out and login again (because you just change the user's group setting).

After that, if you type in nyx you should able to start nyx as a non-root user.

It took a while for me to figure it out as well. Hope this help.

  • cat /etc/passwd | grep debian-tor = tor:x:112:116::/var/lib/tor:/home/debian-tor
    – adriann
    Apr 20, 2020 at 2:13
  • the above can't be correct
    – adriann
    Apr 20, 2020 at 2:20
  • How about getent group debian-tor
    – Algo7
    Apr 20, 2020 at 8:43
  • I saw your question on the tor-relay mailing list as well.
    – Algo7
    Apr 20, 2020 at 20:40

Well, it's an obvious flaw in Debian - an empty users. To solve this I suggest the next sequence I'm using myself for more than a decade to mend this kind of things:

  1. Make a nossh user group and make a sshd config change to make sure that no user belonging to it can do a ssh login
  2. Add the desired user like debian-tor, tor e.t.c to this group
  3. Change the shell to /bin/bash for the user you need to be working properly
  4. Make sure that either in Tor/other-service config file it does the setuidgid() call to change to that user or use a SystemD User and Group service directives to make it from the systemd level - anyway the end result will be the same except the privileged port binding, keep that in mind

You must log in to answer this question.

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