LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-25-2011, 01:23 PM   #1
mkirsch72
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
Always give root (sudo) privileges in Ubuntu 11.10?


Hi everybody!
I am an Ubuntu geek, so I use root privileges (sudo) a lot. It got kind of annoying having to open the terminal and type to in "sudo nautilus" and entering my password each time I wanted to alter a system file. Is there any way to always give me root privileges in the file manager (nautilus)?
 
Old 11-25-2011, 01:32 PM   #2
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
That would be incredibly dangerous and ill-advised.

Also you should always use "gksu nautilus" instead of "sudo nautilus" since nautilus is a GUI application. And you don't need to open a terminal to launch it, just press Alt+F2.

More details here: https://help.ubuntu.com/community/RootSudo
 
1 members found this post helpful.
Old 11-25-2011, 02:12 PM   #3
Juako
Member
 
Registered: Mar 2010
Posts: 202

Rep: Reputation: 84
You could make a shortcut to "gksu nautilus", that will make everything a matter of click + enter password.

edit: now that I remember Gnome 2.x already ships with such launcher, it's called "Nautilus (as root)"

Last edited by Juako; 11-25-2011 at 02:14 PM.
 
1 members found this post helpful.
Old 11-26-2011, 02:56 AM   #4
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by snowpine View Post
That would be incredibly dangerous and ill-advised.

Also you should always use "gksu nautilus" instead of "sudo nautilus" since nautilus is a GUI application. And you don't need to open a terminal to launch it, just press Alt+F2.

More details here: https://help.ubuntu.com/community/RootSudo

when there is alot to do on the system LOGIN AS root
BUT and this is a big but
remember you can destroy the whole system and delete ALL your data on all the mounted file systems with just one mistyped command

there are way too many linux users freaked out over the idea of running as root

back in the days of DOS the one and only account was the same as root and you could delete every thing with just one command
so it is possible to run as root ALL THE TIME with out any problems at all
 
Old 11-26-2011, 08:15 AM   #5
Juako
Member
 
Registered: Mar 2010
Posts: 202

Rep: Reputation: 84
Quote:
Originally Posted by rob.rice View Post
when there is alot to do on the system LOGIN AS root
Or (if you are already logged as a normal user) you can get a root shell via "sudo -s", and a root LOGIN shell via "sudo -i". In systems that use "su" to become root, the equivalent are just "su" for a root shell and "su -" for root login shell.

The "login" type shells simulate the environment you'd get had you really logged in via getty, ie your $SHELL initialization scripts are run, and the working directory changes to root's $HOME (typically /root).
 
Old 11-27-2011, 01:21 PM   #6
mkirsch72
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rob.rice View Post
when there is alot to do on the system LOGIN AS root
BUT and this is a big but
remember you can destroy the whole system and delete ALL your data on all the mounted file systems with just one mistyped command

there are way too many linux users freaked out over the idea of running as root

back in the days of DOS the one and only account was the same as root and you could delete every thing with just one command
so it is possible to run as root ALL THE TIME with out any problems at all
how do you login as root? can you do this from the login menu or the command line?
 
Old 11-27-2011, 02:28 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Never use your system for every day work when logged in as root. We don'r want to have another compromised system that is used to fill our e-mail accounts with spam or attacks servers with DDOS or brute-force.
If you have to use an application as root then elevate your rights for that program only, using sudo or similar approaches, but never run the whole environment with root rights for trivial tasks like surfing the net.
 
Old 11-27-2011, 10:36 PM   #8
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by mkirsch72 View Post
how do you login as root? can you do this from the login menu or the command line?
darkstar login:"root<enter>"
Password:"root's_password<enter>"

just like any other user
 
Old 11-27-2011, 10:49 PM   #9
Juako
Member
 
Registered: Mar 2010
Posts: 202

Rep: Reputation: 84
Quote:
Originally Posted by rob.rice View Post
darkstar login:"root<enter>"
Password:"root's_password<enter>"

just like any other user
Note that in ubuntu (which the OP uses) the root account isn't enabled by default -as it is in slack-... BUT it's easily enabled by setting a root passwd.

However, unless you absolutely need an entire "administrative session", root logins are a really bad idea, as already explained. It's also almost universally unnecessary, as you can login as a normal user and just use sudo for specific administrative tasks, or su/sudo for a root shell (even simulating a root login).

Running X or any other trivial task as root should be avoided at all costs.
 
Old 11-27-2011, 11:05 PM   #10
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by TobiSGD View Post
Never use your system for every day work when logged in as root. We don'r want to have another compromised system that is used to fill our e-mail accounts with spam or attacks servers with DDOS or brute-force.
If you have to use an application as root then elevate your rights for that program only, using sudo or similar approaches, but never run the whole environment with root rights for trivial tasks like surfing the net.
you use slackware did you disallow root logins on ssh
better yet disallow ssh logins completely
ssh can be brute forced an attacker doesn't even need root access any user account
can be zombied for the attacks your talking about just put the attack script in /tmp
and the command to run it in any users .profile or just cat the attack script to ~/.profile

I had a dynamic DNS account and would find the logs filled with attempts to log in using just about every common male name there is except root


My point is you are at no higher security risk running as root than as any other user
the problem with running as root is the damage YOU CAN DO as root

Last edited by rob.rice; 11-27-2011 at 11:12 PM.
 
Old 11-28-2011, 10:20 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by rob.rice View Post
you use slackware did you disallow root logins on ssh
Yes.

Quote:
better yet disallow ssh logins completely
ssh can be brute forced an attacker doesn't even need root access any user account
No, I use key based authentication, pretty difficult to break that with brute force.

Quote:
I had a dynamic DNS account and would find the logs filled with attempts to log in using just about every common male name there is except root
As stated above, I use key based authentication and a non-standard port for that, I never had a login that wasn't me.

Quote:
can be zombied for the attacks your talking about just put the attack script in /tmp
and the command to run it in any users .profile or just cat the attack script to ~/.profile
You are right, but those attacks are pretty easy to find, I would think.

Quote:
My point is you are at no higher security risk running as root than as any other user
I totally disagree. The most dangerous break in is the one thart is unrecognized. It is much easier to hide the break in and the alterations made by the attacker when the attacker has root privileges.
 
1 members found this post helpful.
Old 02-16-2012, 10:19 PM   #12
hells sponge
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
what you could do is type in "sudo passwd root" and create a root password for use in TTY
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give only certain root privileges linuxfia Ubuntu 3 06-01-2009 11:35 AM
how to give root privileges to normal user? caedo Linux - Newbie 11 08-28-2008 03:15 PM
Grant Configuring SUDO Root Privileges to Regular Users +Problem+ redir Fedora 2 02-26-2007 11:10 AM
give account root privileges mgichoga Debian 3 08-08-2005 07:50 AM
How to give user always root privileges? SimeonV SUSE / openSUSE 18 06-23-2005 11:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration