LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root vs Admin (https://www.linuxquestions.org/questions/linux-newbie-8/root-vs-admin-4175434747/)

elena_mishu 10-30-2012 08:26 AM

Root vs Admin
 
Hi :)

I installed Ubuntu some time ago and used it as it is (with just 2 accounts: guest and Admin), since I only used it in order to compile C code sources. Now I finally started to learn Linux from a book; the problem is that when I try to type "su" I am requested to insert the password for root. My admin password won't work here. I know there are various topics about this over the internet, but something is still not clear: when I first installed Ubuntu I received by default the Admin account; did I also received a Root account? So.. who is root? and what happens when I type "sudo su"? it is asking me for my admin password, and then it changes the prompter from "$" to "#". Does that mean that I can only have root powers just as long as the session lasts?

Many thanks,
Elena

acid_kewpie 10-30-2012 08:34 AM

root is the account that an "Admin" account executes things with. in Ubuntu you don't use "su", instead it relies heavily on the better, more secure sudo tool. here, "su -" would be replaced by "sudo -i" and then you would enter YOUR password, not the admin one.

and please *NEVER* run "sudo su" that's just a nasty hack, ALWAYS run "sudo -i" instead. it's even a whole character shorter.

Yes, # means you'll be root. you can run "whoami" too to confirm.

suicidaleggroll 10-30-2012 08:39 AM

Ubuntu and its derivatives work a bit differently than every other Linux distribution under the sun. For some reason, they decided to disable the root account by not assigning it a password, and instead they force all admin to be done through sudo.

An "admin" account in Ubuntu simply means that account is able to do anything they want via sudo. Any account can become an "admin" account by granting it full sudo rights as well.

If you would like to enable the real root account, you can assign it a password with:
Code:

sudo passwd root

acid_kewpie 10-30-2012 08:53 AM

Quote:

Originally Posted by suicidaleggroll (Post 4818135)
If you would like to enable the real root account, you can assign it a password with:
Code:

sudo passwd root

But try not to. Breaking security models is not something to do because you feel like it.

snowday 10-30-2012 09:25 AM

Quote:

Originally Posted by elena_mishu (Post 4818122)
Now I finally started to learn Linux from a book; the problem is that...

Nope, the only "problem" is that you are trying to learn Ubuntu from a book that is not about Ubuntu (which does things a little differently than most other distros).

Much better approach to learn Ubuntu from the official up-to-date Ubuntu-specific documentation, which is available free of charge on their website, starting with this page: https://help.ubuntu.com/community/RootSudo

Then once you have a handle of the basics of Ubuntu, it may be that some of the exercises in your book are general-purpose Linux and can be done on Ubuntu, I really don't know--what is the title, author, and publication date of your book?

elena_mishu 10-30-2012 10:17 AM

Hello again,

Thank you very much for your replies :) they were all very useful. About my book, it is a very very old one "Using Linux" by Larry Schumer and Chris Negus :D I don't indent to run every possible command from it, I just what something to start with. I can't just google something because I don't know enough to have any questions.
At college we're studying Linux, not Ubuntu, but they're teaching at a very very low level, so it won't matter anyway. Could you please recommend me any Ubuntu book/ online courses? (At least to begin with; after that I'll be able to ask questions)

Thank you,
Elena

snowday 10-30-2012 10:31 AM

It looks like your book was published 1995 and Ubuntu was invented in 2004. ;)

Here are some Ubuntu sites that I personally use and recommend:

http://help.ubuntu.com
http://wiki.ubuntu.com
http://ubuntuforums.org
http://www.psychocats.net/ubuntu/

There is also help available inside of Ubuntu, just tap the Super/Windows key and type Help I think? (I'm unfamiliar with the new "Unity" interface.)

And if you are interested in server/networking concepts:

https://help.ubuntu.com/12.04/serverguide/

elena_mishu 10-30-2012 11:09 AM

Thanks again to all of you :) problem solved!


All times are GMT -5. The time now is 06:13 PM.