Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Locate and modify tor script to allow root [SOLVED]

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Locate and modify tor script to allow root [SOLVED]

#1 Post by Scorpion »

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
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Locate and modify tor script to allow root

#2 Post by Bloom »

Do NOT ever run a webbrowser as root!!!!

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Locate and modify tor script to allow root

#3 Post by Scorpion »

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
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: Locate and modify tor script to allow root

#4 Post by Bloom »

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.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Locate and modify tor script to allow root

#5 Post by Bulkley »

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.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Locate and modify tor script to allow root

#6 Post by Scorpion »

With safest option java scripts is disabled by default.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Locate and modify tor script to allow root

#7 Post by Scorpion »

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/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
Last edited by Scorpion on 2020-06-14 19:52, edited 1 time in total.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

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

#8 Post by Bloom »

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
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

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

#9 Post by Scorpion »

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: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

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

#10 Post by Scorpion »

I can launch tor as normal user when I am logged as root.

Code: Select all

ssh -XY <normal_user>@localhost torbrowser-launcher

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

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

#11 Post by reinob »

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.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

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

#12 Post by Scorpion »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#13 Post by Head_on_a_Stick »

Scorpion wrote:I am logged as root mostly
https://www.garyshood.com/root/
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

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

#14 Post by Scorpion »

I really agree, I only use normal user to check things for root like this (tor).

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#15 Post by Head_on_a_Stick »

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/
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

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

#16 Post by Scorpion »

:lol: :lol: :lol:
https://xkcd.com/1200/
Is someone steals my laptop while I' m logged in, they can read my email, take my money, and impersonate me to my friends,

But at least they can' t install drivers without my permission.

Post Reply