LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Run as root (https://www.linuxquestions.org/questions/debian-26/run-as-root-548253/)

phantom_cyph 04-23-2007 05:54 AM

Run as root
 
How can I run as root in Debian? I can't login at the initial screen, is there an option in Debian I haven't found yet that lets me login and change everything like Ubuntu had?

Dutch Master 04-23-2007 06:01 AM

Open a terminal and issue the su command. This prompts you for the root password. Now you're root :)

mikieboy 04-23-2007 07:23 AM

There's also a root terminal. Select that and you will be asked for your password and you're in.

glidermike 04-23-2007 02:24 PM

At the GDM (gnome)login screen,on the bottom you will see a menu item called "actions" click on "configure login manager" you will have to supply your root password. This will bring you to a screen with a couple of tags-go to the security tag and there you will be presented with an option to allow root logins -check it and your good to go.(also you can set the computer to login automatically to a specific user-bypassing the login prompt if you wish)This is a handy way for you to do system maintenance in a graphical mode-but running as root for everyday tasks is a security risk--don't do it!

phantom_cyph 04-23-2007 03:28 PM

Thanks Glidermike! I haven't tried it yet, but it sounds like what I need. I know how to login as root in a terminal, but when you exit the shell, you aren't root anymore.

Quakeboy02 04-23-2007 04:05 PM

Quote:

I know how to login as root in a terminal, but when you exit the shell, you aren't root anymore.
Yes, and that's the whole point. If you setup an root environment, you are eventually going to type "rm -rf *" while in the wrong directory, and that's exactly what's going to happen. Typing that as a regular user isn't quite as painful.

phantom_cyph 04-23-2007 04:10 PM

I don't need to do it very often, just to edit desktop themes.

nx5000 04-23-2007 04:27 PM

Actually it's even more vicious than this.
Some people will configure stuffs under root that are aimed at the user.
And then they whine because the system doesn't work while running as a user.
Because the file is now owned by root.

A good example is when you compile programs under root and then decide to recompile under a user. make clean doesn't work anymore.

You should always try to run as a user and if you really can't, then use programs like sux to do it as root.
:twocents:

JimBass 04-23-2007 04:37 PM

Running as graphical root is foolish, which is why it is disabled in the first place. Everything for a user (themes, desktops and other such toys) should be done as a user. You certainly do not need to be root to add a new theme. Just use the tool that sets the theme, point it at the theme in your user's directory, and it should accept it.

Running as full root is a very poor windows behavior, and one I would personally like to see completely eliminated from the *nix world. Doing things like that open a normally secure *nix box up to problems. Part of what keeps *nix relatively safe is that the regular user does not have permissions to alter "important" files. Running as root bypasses all that well thought out security, so anything you do unintentionally or stupidly as root can effect your entire system. Doing things like you're trying to do will open the same virus/spyware issues to linux that windows suffers from. As I never run as root I don't particularly care what you do, but what you are essentially doing is driving 200 km/h without a seatbealt while drinking. As long as you don't crash it seems fine, but that crash might be really painful.

Peace,
JimBass

phantom_cyph 04-23-2007 04:56 PM

I guess I am used to being able to do it in CentOS quite easily. I never screwed stuff up, I just had to be root to edit my fluxbox themes while I used them to see how they worked.

nx5000 04-23-2007 05:04 PM

Quote:

Originally Posted by kalabanta
I guess I am used to being able to do it in CentOS quite easily. I never screwed stuff up, I just had to be root to edit my fluxbox themes while I used them to see how they worked.

Doesn't mean that you WON'T

The fact is that you don't need to run the WM as root. There is not one single advantage but a lot of drawbacks.

You don't need to be root to edit your fluxbox themes or whatever.

Why do you think people keep on saying again and again the same thing? Because it's bad habit.

The next step you run firefox which contains a buffer overflow. You go on a website that contains a virus. YOu get it, your machine is to be reinstalled. Very easy.

regards

phantom_cyph 04-23-2007 05:22 PM

Goodness gracious-I got the message the first million times. I am careful. Don't yell at me. Settle down, you are only preventing me from respecting/acknowledging your future replies because of how uncontrolled you seem to be. I get the picture.

nx5000 04-23-2007 05:30 PM

Quote:

Originally Posted by kalabanta
Goodness gracious-I got the message the first million times. I am careful. Don't yell at me. Settle down, you are only preventing me from respecting/acknowledging your future replies because of how uncontrolled you seem to be.

Yeah I'm running unstable and it fits to me :D
I can also not reply to you if you prefer.
I think I will stop telling people to not run as root. I don't care in fact.
Being more constructive, it's just that people are kind enough to keep on telling you to not do this and your answer is: I never make mistakes...
In more than 10 years I did 2 times a mistake while running as root.
I lost everthing the second time. There was a link from /mnt/hda1 to /. I mistyped rm -rf /mnt/hda2/ to /mnt/hda1. /bin /boot /etc are the first ones in alphabetical order, too bad..

Emerson 04-23-2007 05:39 PM

Possible damage to your own computer is barely one side...

http://www.linuxquestions.org/questi...40#post2572040

This is why using a computer as root is nothing but rude.

phantom_cyph 04-23-2007 05:46 PM

I don't mind you replying to my posts, just don't 'yell'. I appreciate the advice I am given, but I don't need it in font size 72 to be able to read it. I just wanted to know how to run as root if needed. As far as internet, I unplug my cable whenever I run in root to keep from getting viruses.


All times are GMT -5. The time now is 02:15 PM.