LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-27-2009, 11:22 PM   #1
UbrInKid
LQ Newbie
 
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23

Rep: Reputation: 16
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.
Old 11-27-2009, 11:44 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.
Old 11-27-2009, 11:55 PM   #3
indiajoe
Member
 
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84

Rep: Reputation: 21
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.
Old 11-28-2009, 12:38 AM   #4
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 213

Rep: Reputation: 25
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.
 
Old 11-28-2009, 12:53 AM   #5
UbrInKid
LQ Newbie
 
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23

Original Poster
Rep: Reputation: 16
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..
 
Old 11-28-2009, 12:58 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.
 
Old 11-28-2009, 01:16 AM   #7
UbrInKid
LQ Newbie
 
Registered: Nov 2009
Location: Layton, UT USA
Distribution: Ubuntu 10.10 - Maverick Meerkat
Posts: 23

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Tinkster View Post
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?
 
Old 11-28-2009, 02:44 AM   #8
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Blog Entries: 74

Rep: Reputation: 81
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!
 
Old 11-29-2009, 11:12 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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 06:10 PM.
 
Old 11-29-2009, 11:36 PM   #10
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
you may too type one time "su" then "exit" instead of many "sudo" in a row, when necessary...
 
Old 11-29-2009, 11:49 PM   #11
itsbrad212
Member
 
Registered: Nov 2009
Location: Chicago
Distribution: Arch and OpenBSD
Posts: 104

Rep: Reputation: 19
you could use sudo

if your not in the sudoers file, run:

Code:
visudo
then find where it says:

Code:
root    ALL=(ALL)       ALL
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-29-2009 at 11:51 PM.
 
Old 11-30-2009, 12:11 AM   #12
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
If it anoys you, just login as root!
Never had problem and i do it all da time.
 
0 members found this post helpful.
Old 11-30-2009, 03:43 AM   #13
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: PeppermintOS
Posts: 387
Blog Entries: 74

Rep: Reputation: 81
@ 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.
 
Old 11-30-2009, 03:46 AM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by smeezekitty View Post
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 03:48 AM. Reason: typo
 
Old 11-30-2009, 03:49 AM   #15
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by smeezekitty View Post
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.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root login but no user login on samba Cybercool Linux - Newbie 3 07-13-2011 05:36 AM
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 08:01 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:55 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