Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
11-28-2009, 12:22 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23
Rep:
|
Trying to understand root login vs user login?
I am fairly new to linux (few months of so). I am trying to discover all the wonderous things linux has to offer. One thing in particular though that I am tying to figure out is why the difference between root and user login??
I am the only person that uses my computer so it didnt make sense for me to always login in as a user? As well it annoys me when I want to do various thing to have to type a "sudo" password all the time. But when I look to see how root login works I see all these cations about using root login.. why??? Whats the difference if I am the only user of my computer??
Thanks in advance for all the help!
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
11-28-2009, 12:44 AM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
The biggest difference is two-fold:
a) you protect yourself from yourself - if you do something
like "rm -rf *" and happen to be in your root directory ...
What happens if you're a "normal user"? What happens if you're
root?
Basically having to issue the extra password (do the extra step)
can be considered a friendly reminder that you may render your
machine useless.
b) it protects you from potential flaws in software you're using.
If you have a vulnerable browser, the person who wrote that nasty
site will not be able to simply turn your machine into a drone
in a bot-net.
Cheers,
Tink
|
|
3 members found this post helpful.
|
11-28-2009, 12:55 AM
|
#3
|
Member
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84
Rep:
|
Hi
GNU/Linux is a multiuser OS. It can have more than one user logined at a time from different loacations on network. And root is the GOD on that machine. If you are an expert there is nothing wrong in always working as root. Otherwise I suggest you to work as an ordinary user for the following reasons..
1) Linux gives complete freedom, as a result there is a chance that you will accidently corrupt the importent settings required for the working of the OS. [ Eg : "rm -rf /" if run as root will be catastophe]
So if you are working as an user, you will not be allowed to do them, unless you give the root password.
2) Say you accidently installed some malware (Very rare) , if you were running as root, then malware can completely distroy your machine. If you were running as an user, it wouldn't be powerfull to do anything in large scale.
3) And another important thing is that if you are always running as root and if there is any security hole in any of the programs you are running , you will be in a great danger.
And many more resons are there....
Most importantly "Enjoy GNU/Linux".... Yes it is the best thing Mankind has ever done for humanity.. for a better world..
-Cheers
indiajoe
|
|
1 members found this post helpful.
|
11-28-2009, 01:38 AM
|
#4
|
Member
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 231
Rep:
|
For the reasons stated in the above comments, you should login in as user. But nothing stops you from configuring your OS and permissions on some directories to make life easier. Example: change permissions on wallpapers and icons directories, created a root file browser shortcut on your desktop. (I like Krusader for that). The beauty in Linux is that you can configure almost anything.
|
|
|
11-28-2009, 01:53 AM
|
#5
|
LQ Newbie
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23
Original Poster
Rep:
|
So is there any easy solution to give my "user" all access that doesn't affect system vulnerable processes? If thats the right way to ask that.. My frustration is I find myself having to type passwords 30 times per session and also find I can not use some applications unless I log in as root?? I would like to roam my computer a bit easier and quicker but obviously do not want to ruin my computer because of a misunderstood command..
|
|
|
11-28-2009, 01:58 AM
|
#6
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
You could make that easier by giving yourself permission to run certain
apps passwordless; have a read of 'man sudoers'. But if you're sudoing
30 times per session your usage patters are pretty odd anyway - may I ask
what you're using sudo for? I seldomly have to do anything as root, and
linux has been my primary desktop OS for 8 years now.
|
|
|
11-28-2009, 02:16 AM
|
#7
|
LQ Newbie
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23
Original Poster
Rep:
|
Quote:
Originally Posted by Tinkster
You could make that easier by giving yourself permission to run certain
apps passwordless; have a read of 'man sudoers'. But if you're sudoing
30 times per session your usage patters are pretty odd anyway - may I ask
what you're using sudo for? I seldomly have to do anything as root, and
linux has been my primary desktop OS for 8 years now.
|
Well currently I believe because I am downloading a lot of apps in order to get my system running the way I would like and doing operations I need to make my computer easy to use..
Also I do a lot of web design and connect a lot to my server and it seems that some function I request of my computer require root access?
|
|
|
11-28-2009, 03:44 AM
|
#8
|
Member
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Rep:
|
Check my blog entries. There's some info on using sudo to grant passwordless escalation of priviledges. It's intentionally NOT a step by step guide as I don't feel messing around at that level is suitable for someone who needs a step by step guide. Having said that, give it a read & do a bit of your own further reading & testing then go for it!
|
|
|
11-30-2009, 12:12 AM
|
#9
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415
|
Quote:
Also I do a lot of web design and connect a lot to my server and it seems that some function I request of my computer require root access?
|
such as?
Last edited by chrism01; 11-30-2009 at 07:10 PM.
|
|
|
11-30-2009, 12:36 AM
|
#10
|
Member
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343
Rep:
|
you may too type one time "su" then "exit" instead of many "sudo" in a row, when necessary...
|
|
|
11-30-2009, 12:49 AM
|
#11
|
Member
Registered: Nov 2009
Location: Chicago
Distribution: Arch and OpenBSD
Posts: 104
Rep:
|
you could use sudo
if your not in the sudoers file, run:
then find where it says:
and add *below* that line (dont write over the root line!):
Code:
nameofuser ALL=(ALL) ALL
this way, your user you entered for nameofuser will be given the permission to temporarily assume root status
Last edited by itsbrad212; 11-30-2009 at 12:51 AM.
|
|
|
11-30-2009, 01:11 AM
|
#12
|
Senior Member
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
|
If it anoys you, just login as root!
Never had problem and i do it all da time.
|
|
0 members found this post helpful.
|
11-30-2009, 04:43 AM
|
#13
|
Member
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Rep:
|
@ the two above posters. Sorry, but both posts are bad advice for someone who's still geting to grips with the risks/benefits. To the OP, read this and also my blog post about sudo. Configure sudoers to meet your needs as intelligently as possible and you'll have a convenient to use system that still retains some of the out of the box security provided by seperate root & user accounts.
|
|
|
11-30-2009, 04:46 AM
|
#14
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Quote:
Originally Posted by smeezekitty
If it anoys you, just login as root!
Never had problem and i do it all da time.
|
DO NOT do this.
Evo2.
Last edited by evo2; 11-30-2009 at 04:48 AM.
Reason: typo
|
|
|
11-30-2009, 04:49 AM
|
#15
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Quote:
Originally Posted by smeezekitty
If it anoys you, just login as root!
Never had problem and i do it all da time.
|
This, in my opinion without willing to offend anyone, is the WORST advice someone can give to someone starting out with Linux.
Kind regards,
Eric
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 12:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|