Linux - NewbieThis 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.
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.
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 02:30 AM.
Reason: Inserted signature just created. Content is same.
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.
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.
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.
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.
... 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.
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.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,624
Rep:
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.
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444
Rep:
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
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.