LinuxQuestions.org
Visit Jeremy's Blog.
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 07-20-2012, 01:20 AM   #1
leosubhadeep
Member
 
Registered: Jul 2012
Location: West Bengal,India
Distribution: Ubuntu 14.04,Fedora 20,Windows 7
Posts: 111
Blog Entries: 3

Rep: Reputation: 2
Question 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.
 
Old 07-20-2012, 01:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 07-20-2012, 02:44 AM   #3
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by acid_kewpie View Post
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.
 
Old 07-20-2012, 02:58 AM   #4
uk.engr
Member
 
Registered: Apr 2012
Posts: 131

Rep: Reputation: Disabled
Talking

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.
 
Old 07-20-2012, 03:08 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by uk.engr View Post
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.
 
Old 07-20-2012, 03:12 AM   #6
uk.engr
Member
 
Registered: Apr 2012
Posts: 131

Rep: Reputation: Disabled
Okzzzz.
 
Old 07-20-2012, 06:13 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by acid_kewpie View Post
... 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.
 
Old 07-20-2012, 06:15 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
Old 07-20-2012, 07:38 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Rep: Reputation: 282Reputation: 282Reputation: 282
Thanks
 
Old 07-20-2012, 08:18 AM   #10
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,708

Rep: Reputation: 503Reputation: 503Reputation: 503Reputation: 503Reputation: 503Reputation: 503
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!
 
Old 07-20-2012, 08:31 AM   #11
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Quote:
Originally Posted by Soadyheid View Post
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
 
Old 07-20-2012, 09:55 AM   #12
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by TroN-0074 View Post
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).
 
Old 07-20-2012, 09:59 AM   #13
leosubhadeep
Member
 
Registered: Jul 2012
Location: West Bengal,India
Distribution: Ubuntu 14.04,Fedora 20,Windows 7
Posts: 111

Original Poster
Blog Entries: 3

Rep: Reputation: 2
Thumbs up

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!
 
Old 07-20-2012, 10:42 AM   #14
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Quote:
Originally Posted by Wim Sturkenboom View Post
'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.
Old 07-20-2012, 07:52 PM   #15
jk07
Member
 
Registered: Jul 2012
Location: USA
Distribution: Ubuntu 12.04 LTS, Kubuntu 12.04 LTS, Scientific Linux 6.3
Posts: 97

Rep: Reputation: Disabled
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.
 
  


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
[SOLVED] Root Account Not Showing At Login... Iridiumx2 Debian 16 08-05-2011 01:16 AM
I can not login to my root account in ubuntu 9.10 124vikas.dange@gmail.com Linux - Desktop 3 01-28-2010 04:33 AM
Root account login oluwasijibomi Fedora 9 08-31-2009 07:02 AM
Root Account Disabled (not smart) Can not root LOGIN mitchellray Slackware 12 06-30-2009 12:52 PM
can't login into root account eye Red Hat 5 11-21-2003 08:30 PM

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

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