LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need to have ubuntu 12.10 root privilege (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-have-ubuntu-12-10-root-privilege-4175448100/)

NM04 02-01-2013 12:13 AM

need to have ubuntu 12.10 root privilege
 
hi all,
i have installed ubuntu 12.10 on VMware 9.0.
1) how do i switch to root user ? I tried 'su' it prompts for the password i gave the pass which i assigned initially then also it is not giving me root privilege.

ChooseLife 02-01-2013 12:33 AM

try
sudo su -

su asks you for root's password, sudo asks for the user's password

chrism01 02-01-2013 12:38 AM

As above, its quirk of Ubuntu (sigh ..) that it disables the root acct and assigns full privileges via sudo to the first user acct created at install time.
Definitely not Std *nix procedure.

ChooseLife 02-01-2013 01:03 AM

Quote:

Originally Posted by chrism01 (Post 4881960)
As above, its quirk of Ubuntu (sigh ..) that it disables the root acct and assigns full privileges via sudo to the first user acct created at install time.
Definitely not Std *nix procedure.

[pov]You know, it was a huge pet peeve of mine at first, until I realized that by doing so Ubuntu's probably done more for the "use a non-root account for daily work (on a desktop Linux)" principle than a decade of preaching within the community... [/pov]

descendant_command 02-01-2013 01:44 AM

*cough*

chrism01 02-01-2013 01:46 AM

I'm not convinced ... If someone is daft enough to run all day as root, they'll run all day as 'sudo su -', which is the same thing (effectively).
YMMV

ChooseLife 02-01-2013 03:35 AM

Quote:

Originally Posted by chrism01 (Post 4881996)
I'm not convinced ...

Yeah, this is highly subjective, just sharing an opinion because for a long time I felt strongly opposite.

Quote:

Originally Posted by chrism01 (Post 4881996)
If someone is daft enough to run all day as root, they'll run all day as 'sudo su -', which is the same thing (effectively).

I think the demographics that is protected by this method would not know where to enter "sudo su -" to begin with... Just like they don't know why they should bother creating additional accounts during/after setup when root seems to work just fine.

abhijitkarkhanis 02-01-2013 04:05 AM

Hey,

Its seems to be you want to unlock root user in ubuntu to do this follow below instructions.

In the terminal type
sudo passwd root
(now set the password to root whatever you want)

Now if you want graphical for just logout and select other user option to login by root
and if you want to use root user on terminal follow normal su- command.

That's it !!!

NM04 03-04-2013 06:40 AM

Thanks everyone for valuable inputs. I did the task using "sudo".

Quote:

Originally Posted by chrism01 (Post 4881960)
As above, its quirk of Ubuntu (sigh ..) that it disables the root acct and assigns full privileges via sudo to the first user acct created at install time.
Definitely not Std *nix procedure.

I didn't know this,thanks for sharing. I think its because security reasons, wherever ubuntu is used as server, even if it gets hacked the attacker will never be able to have root access.

cheers,
nm

chrism01 03-04-2013 06:52 AM

No, they know its Ubuntu, so they try to crack the 1st user's passwd (all of them if needed...)
Using a real root is theoretically better, because they have to guess BOTH of the correct user's acct name & passwd, then also guess root's passwd (assuming remote root is disabled, which is normal).
With Ubuntu, they don't need to guess root passwd.

IOW, there's a reason *nix has been around since 1970 and only Ubuntu (a very recent distro of Linux) works that way.
(I believe Ubuntu derivatives may do the same).

snowday 03-04-2013 08:28 AM

I recommend to use 'sudo' in Ubuntu for one very simple reason: All official Ubuntu help pages and support forums assume you are using 'sudo'. If you use 'sudo' then you won't have any trouble following the documentation.

NM04 03-14-2013 04:34 AM

Quote:

Originally Posted by chrism01 (Post 4904285)
No, they know its Ubuntu, so they try to crack the 1st user's passwd (all of them if needed...)
Using a real root is theoretically better, because they have to guess BOTH of the correct user's acct name & passwd, then also guess root's passwd (assuming remote root is disabled, which is normal).
With Ubuntu, they don't need to guess root passwd.

IOW, there's a reason *nix has been around since 1970 and only Ubuntu (a very recent distro of Linux) works that way.
(I believe Ubuntu derivatives may do the same).

I totally agree with this, in 1st users case they have to crack only pass, but in case of root they have to crack both user name & pass. So, why people prefer ubuntu over other distros, be it a server or anything else, when many others are available ?

TobiSGD 03-14-2013 06:27 AM

sudo has its use cases, especially on server environments, because you can give fine grained privileges to people to use applications as root without giving them total control over the machine. The way Ubuntu uses it may be fine for desktop users (in my opinion it is not, but this is a matter of taste, I would think), but is at least questionable on servers that allow password based authentication.
But anyways, on a properly secured server you use key-based athentication anyways, so regardless if an attacker manages to break into the system (which is unlikely unless he somehow gets access to your key) he still has to find out the password needed for root access, regardless if su or sudo is needed.

Quote:

So, why people prefer ubuntu over other distros, be it a server or anything else, when many others are available ?
On desktop systems it is clearly a matter of taste if you prefer a distro that makes it easy for the user with the downside of having impacts on security or if you prefer a distro with more control, with the downside that some people are annoyed that they have to switch to a different user for system maintenance. On a system that is aimed at being purely used with GUI tools (which nowadays is not that hard) the only downside of using su instead of sudo is that you have to keep in mind two passwords.

Why people use Ubuntu in server environments, honestly, I have no clue. I would always prefer a distro that aims to release a new version when it is done, not when a fixed release date is reached. I would think that the high marketshare on desktop systems leads to it being used on servers also.


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