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.
|
 |
|
07-20-2012, 01:20 AM
|
#1
|
Member
Registered: Jul 2012
Location: West Bengal,India
Distribution: Ubuntu 14.04,Fedora 20,Windows 7
Posts: 111
Rep:
|
Can I login into root account in Ubuntu?
Hi friends.
Needless to say I am a total newbie on Linux/*NIX platform. After trying a number of distros, finally chose to stick to Ubuntu (12.04 TLS).
My question is: Can I login into the root account? Y'know, I don't want to actually do it, but it seems some tweaks which need to be system-wide (e.g. MS font families installation, editing yum.config file etc.) requires a root login. I can, FYI, get root access (sudo and su) and also set the root password. But I want to be in the account to get unlimited access.
Please help. Thanks in advance.

Subhadeep
Last edited by leosubhadeep; 07-20-2012 at 01:30 AM.
Reason: Inserted signature just created. Content is same.
|
|
|
07-20-2012, 01:42 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
you wouldn't directly log in, but you can trivially change to the root account by running "sudo -i" and entering YOUR password. That IS "unlimited access". Always use sudo, that's how Ubuntu works. And it DOES work.
|
|
|
07-20-2012, 02:44 AM
|
#3
|
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230
|
Quote:
Originally Posted by acid_kewpie
Always use sudo, that's how Ubuntu works. And it DOES work.
|
I second that!
Using sudo is the recommended way to get super user access on Ubuntu. Using the root account on Ubuntu is not recommended.
Many people do use the root account on Ubuntu though; and some of those people get themselves into problems with it.
I have always used sudo on Ubuntu, and I have never had a problem with it.
I have never found the need to use the root account on Ubuntu.
If you want a separate root account, then use Debian or any of the many distros that use a separate root account.
|
|
|
07-20-2012, 02:58 AM
|
#4
|
Member
Registered: Apr 2012
Posts: 131
Rep: 
|
Yes I was also had the same problem. when I "su" to enter the root's account it gives authentication fail. Then I unexpectedly tried "sudo su" and entered password so I entered in root's account.
Last edited by uk.engr; 07-20-2012 at 03:02 AM.
|
|
|
07-20-2012, 03:08 AM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
Quote:
Originally Posted by uk.engr
Yes I was also had the same problem. when I "su" to enter the root's account it gives authentication fail. Then I unexpectedly tried "sudo su" and entered password so I entered in root's account.
|
that is NOT a "problem" that's you using Ubuntu incorrectly. When I'm king, anyone who rusn "sudo su" will have their eyelids removed. never ever do this. run "sudo -i". that is the correct way to become root on Ubuntu.
|
|
|
07-20-2012, 03:12 AM
|
#6
|
Member
Registered: Apr 2012
Posts: 131
Rep: 
|
Okzzzz.
|
|
|
07-20-2012, 06:13 AM
|
#7
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
Quote:
Originally Posted by acid_kewpie
... When I'm king, anyone who rusn "sudo su" will have their eyelids removed. ...
|
How about 'sudo su -'? If you also want to cut my eyelids, please explain to me why. What makes 'sudo -i' preferable over 'sudo su -'? I know there are minor differences in the environment setup between the two but can't see the implications.
|
|
|
07-20-2012, 06:15 AM
|
#8
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
because sudo creates a properly auditable environment for a shell to be created that knows it's being executed within sudo. su within sudo has no idea that it's under sudo.
|
|
2 members found this post helpful.
|
07-20-2012, 07:38 AM
|
#9
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
Thanks
|
|
|
07-20-2012, 08:18 AM
|
#10
|
Senior Member
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,708
|
Quote:
If you want a separate root account, then use Debian or any of the many distros that use a separate root account.
|
I thought the general rule of thumb was that Debian and its derivatives used 'sudo' while RedHat based distros used 'su' to gain root access? The latter having a password accessable root account.
Play Bonny! 
|
|
|
07-20-2012, 08:31 AM
|
#11
|
Senior Member
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444
|
Quote:
Originally Posted by Soadyheid
I thought the general rule of thumb was that Debian and its derivatives used 'sudo' while RedHat based distros used 'su' to gain root access? The latter having a password accessable root account.
Play Bonny! 
|
Sudo is available on all distros and UNIX like OSs as far as I know. I think it is available even in Mac OS but I dont know for sure. You just have to configure it to behave the way that does in Ubuntu and LinuxMint.
su comes ready in all distros but the guys in Canonical (Ubuntu's headquarters) ship their product with su disabled
|
|
|
07-20-2012, 09:55 AM
|
#12
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
Quote:
Originally Posted by TroN-0074
su comes ready in all distros but the guys in Canonical (Ubuntu's headquarters) ship their product with su disabled
|
'su' is not disabled  You can happily 'su' to any user as long as you know his / her password.
The only thing that is disabled (in Ubuntu and co) is the login as root; the root account has a hash in /etc/shadow that can't be generated from any possible password and therefore login is disabled. It's a similar approach as locking an account with 'passwd -l' (CAREFUL WITH THIS COMMAND AS IT CAN LOCK YOU OUT).
|
|
|
07-20-2012, 09:59 AM
|
#13
|
Member
Registered: Jul 2012
Location: West Bengal,India
Distribution: Ubuntu 14.04,Fedora 20,Windows 7
Posts: 111
Original Poster
Rep:
|
I presume one line of my comments has brought foward confusions.
Quote:
I can, FYI, get root access (sudo and su) and also set the root password.
|
Actually, 'su' is used for root grant for a session; whereas 'sudo' is supposed to exexcute every command needing root access.
At least I experienced that, on Ubuntu which is debian-based.
However, I did a lot of googling and found it: http://bit.ly/LxsMhF.
*NOTE:As it says, USE IT AT YOUR OWN RISK!
|
|
|
07-20-2012, 10:42 AM
|
#14
|
Senior Member
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444
|
Quote:
Originally Posted by Wim Sturkenboom
'su' is not disabled  You can happily 'su' to any user as long as you know his / her password.
|
Thank you for point that out.
Quote:
However, I did a lot of googling and found it
|
I presume this thread can now be mark as solved then.
|
|
1 members found this post helpful.
|
07-20-2012, 07:52 PM
|
#15
|
Member
Registered: Jul 2012
Location: USA
Distribution: Ubuntu 12.04 LTS, Kubuntu 12.04 LTS, Scientific Linux 6.3
Posts: 97
Rep: 
|
I'm coming back to Linux after several years of being away from it. When I last used Linux, one of the first accounts set up was a root account and everyone else was a standard user, and root was only used for maintenance. There was nothing like an "administrator" account. I believe that this idea was taken from Microsoft, and I think that it was a change for the worse. If I'm installing an operating system, I want the unlimited right to have unlimited access to my own system when I want to do certain things. This "sudo-ing" makes me feel like I'm being babypsitted, like I can't be trusted to act as root on my own system.
I use Ubuntu and have set a root password, and I now have the ability to su for root control. I do use sudo for quick things like apt-get, but when I have to, say, change permissions on multiple directories, I refuse to do it one sudo at a time.
|
|
|
All times are GMT -5. The time now is 09:18 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
|
|