Log in as ROOT

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

In general logging in as root is BAD and logging into a DE as root is even worse. :evil:

there are many posts in the forum about logging in as root and the dangers of doing it.

mint and other Ubuntu derivatives use the sudo command to run commands or start GUIs as root. this is to try and stop people destroying their new system easily because they do not know what they are doing.

you can temporarily become root in a terminal with this comand:

sudo su -

this is much safer.

If you still really want to login as root you have to give the root user a password. open a terminal and type:

sudo passwd root

:D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
Now where was i going? Oh yes, crazy!
Lolo Uila
Level 5
Level 5
Posts: 575
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Post by Lolo Uila »

The root account is not enabled by default in Mint and most other Ubuntu based ditros because there is no need for it. To execute a command in the shell or terminal as root just preface it with sudo, and use your login password when asked. Example:

Code: Select all

sudo nano /etc/X11/xorg.conf
You can set a root password, and even enable root login to the GUI, but it is not recommended. As for how that is done... well, if you have to ask you probably shouldn't do it. I'm sorry if that sounds insulting. I don't know of a polite way to say it. We frequently have people asking this question, claiming they are experienced users, and yet they can't figure out how to do this. I was a total Linux noob (although quite experienced with computers in general) and it took me all of 5 minutes to figure out how to enable the root account and GUI login when I looked into it. The solution is actually pretty simple and if you can't figure it out on your own then you probably shouldn't be messing around as root.

Anyway... as I said before, there is no need for the root account, and it's more secure without one. Just use sudo and you can accomplish what you need.

Aloha, Tim
red-e-made
Level 5
Level 5
Posts: 526
Joined: Sat Jul 14, 2007 11:31 am

Post by red-e-made »

I'd underline what Lolo Uila said. It's not that anyone is trying to be deliberately condescending about it; it's just not a good idea. Additionally, the need to log in as root occurs so seldom that it's unnecessary to go to any extra lengths. Use "sudo su" when needed, and always remember to "exit". That's it, really.
User avatar
linuxviolin
Level 8
Level 8
Posts: 2081
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Post by linuxviolin »

baba wrote:I like to use the root login when I am setting up or making major mods to a system. I like to do it through GUI, easier, faster, less prone to errors. I get tired of continually entering my password.
Avoid using root login... :wink: "Less prone to errors"? Hum... :roll: If you know what you do then even without GUI no problem, and if not then don't do it (or ask for help). Easier? Faster? All that is debatable. And sometimes GUI=bugs :?
baba wrote:The reason I am migrating to Linux from M$ is I am fed up with being constrained as to how I want to use my system.


Even Microsoft tried to improve the security in Vista and to educate the home user not to use an administrative account. :)

baba wrote:As an expert, I can tell you the best defense for protecting yourself from screwups is BACKUPS, not lockouts.


Maybe but I prefer lockouts and keep my system clean. :wink: As an "expert", avoid using root login.
Of course it's your system and you do what you want but you will find everywhere on the Web advices saying to you to avoid doing it, so maybe... :wink:
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

you can start GUI tools via the command line as root with:

sudo toolname
or
gksu toolname (graphical sudo, better for some gui's)

this is much safer than logging in as root.

:D
Image
Now where was i going? Oh yes, crazy!
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

baba wrote: I like to use the root login when I am setting up or making major mods to a system. I like to do it through GUI, easier, faster, less prone to errors.
And what happens if you do an accidental drag & drop operation??? :twisted: Do you think the system will ask you "Are you sure?". Hint: It won't. It will do as you said. Being logged in as 'root' into a GUI simply gives you too much power. And I am saying this as UNIX admin :D
baba wrote: I get tired of continually entering my password.
And you think reinstalling your system because you just managed to hose it is less tiring? :lol: I am talking out of my own experience here. When I started with Linux in 1996 did people warn me not to login into GUI as 'root'? Yes they did. Did I listen? No, I didn't. I was one of those noobs who learned the hard way. :lol: You are of course more than welcome to repeat my stupid mistakes. So please, continue to login into your GUI as 'root'. Why not open a file manager or two? Sure, go ahead. Click around. You are 'root', you are *GOD*. Nothing will stop you. *NOTHING*. And then when something silly happens (e.g. accidental drag & drop over all the wrong places ... or accidental change of all the file permissions in a really critical location? :lol: ) you will remember this thread ... just as I remember those postings people sent me back in 1996 where they warned me not to go into GUI as 'root'.

As I said ... some people prefer to learn the hard way. I must know, I was one of those :D
baba wrote: The reason I am migrating to Linux from M$ is I am fed up with being constrained as to how I want to use my system.
Nothing is constraining you here. As 'root' you enjoy infinite powers and you may hose your system whatever way you wish :lol:
baba wrote: I am an "expert" user
Not on Linux yet :twisted:
baba wrote: but getting there.
Maybe in 2-3 years. I started with Linux in 1996 but until 1998 I considered myself a "noob". Now it's 2007, I got like 10 years of UNIX work experience, and even now I learn a few new things. For there are always greater people than oneself.
baba wrote: As an expert, I can tell you the best defense for protecting yourself from screwups is BACKUPS, not lockouts.
See above. root's powers are infinite. Nothing will stop you from doing seriously bad things if you wish to. So sometimes it's a good idea to have some minimum constraints that will force you to think "Hmmm, what do I need to achieve here and do I really really need to be 'root' for this?" ... Because once you're 'root' there is nothing that will stop you from doing anything.
Locked

Return to “Installation & Boot”