Locate and modify tor script to allow root [SOLVED]

If none of the more specific forums is the right place to ask

Locate and modify tor script to allow root [SOLVED]

Postby Scorpion » 2020-03-24 07:36

To install tor (browser) you launch the tor-browser-launcher that installs it.
Where are the tor files saved?
I would like to see the script that launches tor to allow the root user.
I did before on debian 9.
This is a pc with a fresh installation of debian 10.

Message error:
The Tor Browser Bundle should not be run as root. Exiting.

Lines to remove:
Code: Select all
    if [ "`id -u`" -eq 0 ]; then
        complain "The Tor Browser Bundle should not be run as root.  Exiting."
        exit 1
    fi
Last edited by Scorpion on 2020-03-28 14:40, edited 2 times in total.
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root

Postby Bloom » 2020-03-24 08:32

Do NOT ever run a webbrowser as root!!!!
User avatar
Bloom
 
Posts: 260
Joined: 2017-11-11 12:23

Re: Locate and modify tor script to allow root

Postby Scorpion » 2020-03-24 15:26

Bloom wrote:Do NOT ever run a webbrowser as root!!!!

I would like to do it, on another pc with debian 10 I am doing it. Upgraded from stretch.
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root

Postby Bloom » 2020-03-24 17:31

Why on earth would you like to do that?
Running a webbrowser as root will mean that JavaScript will also run as root. Can you imagine what a malevolent website could do with that?
There is no valid reason to ever run a webbrowser as root, so please do not do that. You could as well run Windows if you're going to compromize a Linux system like that.
User avatar
Bloom
 
Posts: 260
Joined: 2017-11-11 12:23

Re: Locate and modify tor script to allow root

Postby Bulkley » 2020-03-24 20:25

Bloom wrote:Do NOT ever run a webbrowser as root!!!!


+1. Not only that it goes right around the purpose of Tor.

The best way to run Tor browser is as an app image in your user account. There are instructions on the Tor website.
Bulkley
 
Posts: 5930
Joined: 2006-02-11 18:35

Re: Locate and modify tor script to allow root

Postby Scorpion » 2020-03-25 07:30

With safest option java scripts is disabled by default.
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root

Postby Scorpion » 2020-03-28 14:39

With:
Code: Select all
dpkg -L torbrowser-launcher

I found the files installed by the package, and after some researches I found the file to edit:
Code: Select all
gedit ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser

If you open the folder with the GUI the name is "start-tor-browser".

I commented the 4 lines and now I can launch tor as root.
Code: Select all
    #if [ "`id -u`" -eq 0 ]; then
    #   complain "The Tor Browser Bundle should not be run as root.  Exiting."
    #   exit 1
    #fi
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root [SOLVED]

Postby Bloom » 2020-03-28 17:02

So you insist on running Tor as root, although the makers don't want you to do that, and numerous people on this forum including me have written that this is a very bad idea.
If you manage to get your system damaged by hackers or malware that way, I hope you're not asking for help here because I for one am not going to help you then.
You need to run Windows and stay far away from Linux.
User avatar
Bloom
 
Posts: 260
Joined: 2017-11-11 12:23

Re: Locate and modify tor script to allow root [SOLVED]

Postby Scorpion » 2020-03-29 07:24

Yes I insist, thank you all for the warnings but I want to use root.
I will eventually change idea one day...

Some OS by default let you use root and you cannot login as normal user.
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root [SOLVED]

Postby Scorpion » 2020-03-29 07:33

I can launch tor as normal user when I am logged as root.
Code: Select all
ssh -XY <normal_user>@localhost torbrowser-launcher
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root [SOLVED]

Postby reinob » 2020-03-30 11:57

Scorpion wrote:Yes I insist, thank you all for the warnings but I want to use root.
I will eventually change idea one day...


May I ask, out of curiosity, what advantages you think running a browser as root may have?

I don't think there's anything a browser does that may require root, so I'm really curious about your reasons for wanting exactly that.
reinob
 
Posts: 779
Joined: 2014-06-30 11:42

Re: Locate and modify tor script to allow root [SOLVED]

Postby Scorpion » 2020-03-30 15:45

Open tor browser as root is not important , I am logged as root mostly.

I am also trying to open tor as normal user:
Code: Select all
ssh -XY <normal_user>@localhost torbrowser-launcher


Is this necessary?
Code: Select all
xhost +


But I am having this error in the tor' s GUI:
Sorry. We just need to do one small thing to keep going.

Tor Browser has just been updated in the background. Click Restart Tor Browser to complete the update.

We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.

I rebooted the pc and logged out. But nothing.

If I login as normal user I can use tor.
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root [SOLVED]

Postby Head_on_a_Stick » 2020-03-30 16:58

Scorpion wrote:I am logged as root mostly

https://www.garyshood.com/root/
User avatar
Head_on_a_Stick
 
Posts: 12001
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Locate and modify tor script to allow root [SOLVED]

Postby Scorpion » 2020-03-31 13:39

I really agree, I only use normal user to check things for root like this (tor).
User avatar
Scorpion
 
Posts: 173
Joined: 2018-10-17 11:38

Re: Locate and modify tor script to allow root [SOLVED]

Postby Head_on_a_Stick » 2020-03-31 13:51

Scorpion wrote:I really agree

I was being sarcastic.

But hey, the Puppy Linux developers clearly agree with you: https://bkhome.org/archive/puppylinux/t ... l/root.htm

See also https://xkcd.com/1200/
User avatar
Head_on_a_Stick
 
Posts: 12001
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable