LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Adding a "default" Firefox profile to the /root user folder? (https://www.linuxquestions.org/questions/ubuntu-63/adding-a-default-firefox-profile-to-the-root-user-folder-4175550366/)

ZTagr 08-10-2015 07:13 AM

Adding a "default" Firefox profile to the /root user folder?
 
Hi all;

Just recently, I was installing packages on my Kubuntu 15.04 system using the Synaptic package manager when I noticed that there was a link to a website for that package; I had never tried to use this link before (for this or any other package I installed using Synaptic...), and so I thought I would check it out.

To my surprise, I received several error messages, the first pertaining to the fact that Firefox could not locate a user profile for the ROOT user (I know why it can't, of course...); then a second message along the same lines stating that Konqueror's config file located in:
/root/.kde/share/config/konquerorrc
could not be written.

These two errors got me to thinking: Yes, I did run Synaptic with sudo, to give it root-user "powers", and so now Synaptic is running like it actually IS the "root" user, although there is no such user in Ubuntu. Which leads me to my question:

Is is a good / bad / terrible idea to create default "profile"-type files for the "root" user in the /root folder, such as Firefox's default profile, or Konqueror's "konquerorrc" file? I could simply copy MY OWN USERS copy of these particular files into the /root folder, at each file's "normal" location, modifying these in any way required should they obviously pertain to some account OTHER than the "root" user...; would this help in any way, or is it even necessary?

I just don't like receiving error messages when I think that something might be done about them! But I don't know the ramifications of adding content to the /root folder, if there are indeed any at all, on Ubuntu Linux systems...

Up until this point, I had never attempted to run Firefox from a program started with the "sudo" switch, and so I was never before confronted with this particular issue. Now I see that even the Konqueror web browser / file manager program has this same issue, and I'm wondering just how many other programs try to read or write to config. files that SHOULD be found in the /root folder, but of course are not actually there!

Does anyone have any advice for me on how I should proceed from here? I just want to know if what I am considering is a good idea or not...

Thanks in advance,
ZTagr.

John VV 08-10-2015 12:26 PM

Warning: is is a very BAD idea to run firefox as ROOT!!!!


open a terminal
become root
launch firefox
-- this works on my Debian8 install ( and rhel and suse )
Code:

su -
---- type in the root password when asked for ----
firefox

it is a bad idea to use FF as root

ntubski 08-10-2015 12:43 PM

This sounds like a deficiency/bug in Synaptic: it should really be opening web sites with your original, non-elevated user id. So I think you should open a feature request/bug report against Synaptic.

JimKyle 08-10-2015 11:16 PM

Quote:

Originally Posted by ntubski (Post 5403956)
This sounds like a deficiency/bug in Synaptic: it should really be opening web sites with your original, non-elevated user id. So I think you should open a feature request/bug report against Synaptic.

Nope, not a bug in Synaptic. The problem is that "sudo" is working as designed!

It's a guaranteed problem-creator to use "sudo" with any GUI program such as Synaptic; that's why "gksu" and "gksudo" exist. They differ from "sudo" in the way they treat the current user ID and current environment variables. With sudo, the current user becomes root, with root's environment variables; with the others, the shell is launched with root privilege but the environment and specifically $USER remain those of the logged-in user. When installing packages, $USER determines who will own and control the installed files.

Normally, Synaptic's launcher (at least in Gnome and XFCE) goes through a pop-up authentication window that effectively invokes gksudo to do the launch, and this problem never arises. To launch from a command line prompt, using "gksudo Synaptic" will get the same (good) result.

And I agree fully that going on line as "root" is never a good idea. Too many zero-day exploits abound to take the risk of losing everything!


All times are GMT -5. The time now is 04:34 PM.