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.
|
|
|
02-11-2017, 05:42 AM
|
#1
|
LQ Newbie
Registered: Feb 2017
Posts: 14
Rep:
|
How To Access SuperUser?
Wiped the entire HDD out. Had a new clean install of the OS.
I open a Terminal. I type "su" and it asks me a password. I type my account password, returns "Authentication Failure"! I tried the only other password also, the one I created while installing the OS, the one used for encrypting the hard drive, but the result is the same.
How do I access SuperUser privileges? What's the superuser password?
|
|
|
02-11-2017, 06:02 AM
|
#2
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
You will need to tell us which distro (and version) you are using. Not all Linux distros work in the same way.
Welcome to LQ by the way. :-)
|
|
|
02-11-2017, 06:25 AM
|
#3
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
Maybe: sudo su
Welcome! Remember to *spend some time* web-researching first! Welcome!
|
|
|
02-11-2017, 06:42 AM
|
#4
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,102
|
Quote:
Originally Posted by Eddie23
Wiped the entire HDD out. Had a new clean install of the OS.
I open a Terminal. I type "su" and it asks me a password. I type my account password, returns "Authentication Failure"! I tried the only other password also, the one I created while installing the OS, the one used for encrypting the hard drive, but the result is the same.
How do I access SuperUser privileges? What's the superuser password?
|
There are basically two ways that Linux can handle supervisor rights
1) Most distros ask you during the installation to provide a "root password". You will use this subsequently to gain root (supervisor) access. Then, at a later stage, they ask you for a name and password for your user account.
2) The Ubuntu family do not ask for a root password because they do not use one. Instead, you are asked to provide a user name and password, and this named user is then given root access through the use of the sudo command and his/her own password.
You installed this system, so you should be able to remember which of these two sequences you went through.
|
|
|
02-11-2017, 06:44 AM
|
#5
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
Quote:
Originally Posted by Jjanel
Maybe: sudo su
|
'Sudo -i' would be better, 'sudo su' can cause confusion as many environmental variables are from the original user and not the intended one from the root user. Alternatively 'sudo su -' is functionaly equivalent to 'sudo -i'
|
|
1 members found this post helpful.
|
02-19-2017, 03:16 AM
|
#6
|
LQ Newbie
Registered: Feb 2017
Posts: 14
Original Poster
Rep:
|
How To Access SuperUser?
I'm using Trisquel, which is Ubuntu based.
I've finally got it to work, but I still don't understand why initially when I was typing "su" (and obviously it's still the same) it was asking me a password and when I was entering the only (two) passwords in existence, it was telling me "Authentication Failure"? I mean, I'm doing the same thing now, except with "sudo" and it is giving me the root access!
|
|
|
02-19-2017, 04:01 AM
|
#7
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,102
|
Quote:
Originally Posted by Eddie23
I'm using Trisquel, which is Ubuntu based.
I've finally got it to work, but I still don't understand why initially when I was typing "su" (and obviously it's still the same) it was asking me a password and when I was entering the only (two) passwords in existence, it was telling me "Authentication Failure"? I mean, I'm doing the same thing now, except with "sudo" and it is giving me the root access!
|
In Ubuntu and its derivatives, there is a root password, but nobody knows what it is. It isn't set by the user who installs the system (as it is in most distros) but is built in by the developers. So if you use su, which requires the root password, you won't find a password that fits. Sudo works quite differently. It just checks in the /etc/sudoers file that you have the right to invoke it, and also that you really are the user named in that file (you know the password).
You say you have two passwords. I don't know what the second one is, but it won't be the root password if Trisquel works like Ubuntu.
|
|
|
02-19-2017, 04:17 AM
|
#8
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
I'm guessing the first line in /etc/shadow has: root:*:... [does yours?]
So, root can't 'login' (which is what su [vs. sudo] does).
You can do as #5here, but not su [root]
On Debian-based distros (Ubuntu/Mint), that's 'the way'
(tho some people don't like that [ONLY sudo] 'design')
I gave my trisquel a root password, so I can [then] login as root
(since not visible to the internet, and it's just a 'play' VBox)
Here's some links (one to a 171page pdf !)
p.s. I can [then] login as root -only- on a local console/terminal
( -not- ssh/putty/telnet, but that's another [pam] theory-story!
su [then] 'works', from anywhere, with the root passwd -I- gave it )
Last edited by Jjanel; 02-19-2017 at 04:49 AM.
|
|
|
02-19-2017, 06:42 AM
|
#9
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,102
|
Quote:
Originally Posted by Jjanel
On Debian-based distros (Ubuntu/Mint), that's 'the way'
(tho some people don't like that [ONLY sudo] 'design')
|
It isn't the way in Debian itself, which has a completely traditional setup: root password and no active sudoers by default. I think Ubuntu introduced that sudo-only thing, but they probably borrowed it from Knoppix, another Debian distro. I remember using a Knoppix live disc that worked like that before Ubuntu was fully released.
|
|
|
02-19-2017, 09:22 AM
|
#10
|
LQ Newbie
Registered: Feb 2017
Posts: 14
Original Poster
Rep:
|
Quote:
Originally Posted by hazel
… there is a root password, but nobody knows what it is. It isn't set by the user who installs the system (as it is in most distros) but is built in by the developers.
|
Isn't this like a security risk? I mean what you say is that there are bunch of guys out there with superuser passwords for practically everybody's computer who uses Ubuntu or its derivatives. And who uses which OS shouldn't be hard to find out for people who browse the internet with 'User Agents' and what not. No...???
Any comments??
|
|
|
02-19-2017, 09:41 AM
|
#11
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Quote:
Originally Posted by Eddie23
Isn't this like a security risk? I mean what you say is that there are bunch of guys out there with superuser passwords for practically everybody's computer who uses Ubuntu or its derivatives. And who uses which OS shouldn't be hard to find out for people who browse the internet with 'User Agents' and what not. No...???
Any comments??
|
I'm not convinced there is a root password -- I think the account is just disabled. However, if there is a "password" set I would expect that the password field in the shadow file would be populated with some random number set at install time. I'm fairly certain there is no single root password that is set on all these systems -- it's just not the way things are done.
|
|
|
02-19-2017, 11:05 AM
|
#12
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,102
|
When you look at the shadow file, you can see a string where the password hash would be. I never thought to find out where it comes from.
|
|
|
02-19-2017, 11:23 AM
|
#13
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
Quote:
Originally Posted by hazel
It isn't the way in Debian itself, which has a completely traditional setup: root password and no active sudoers by default. I think Ubuntu introduced that sudo-only thing, but they probably borrowed it from Knoppix, another Debian distro. I remember using a Knoppix live disc that worked like that before Ubuntu was fully released.
|
Just for info, it appears that you can make the choice during the installation of Debian whether to have the traditional root login or whether to disable the root account (by leaving the root password blank):
https://debian-handbook.info/browse/...ion-steps.html (section 4.2.9)
|
|
|
02-19-2017, 11:25 AM
|
#14
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,102
|
Quote:
Originally Posted by hydrurga
Just for info, it appears that you can make the choice during the installation of Debian whether to have the traditional root login or whether to disable the root account (by leaving the root password blank)
|
I'm sure that's new. Sudo-only is like systemd: it spreads by infection.
|
|
|
02-19-2017, 11:26 AM
|
#15
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
Quote:
Originally Posted by hazel
I'm sure that's new. Sudo-only is like systemd: it spreads by infection.
|
:-D Coming to a distro near you, soon.
|
|
|
All times are GMT -5. The time now is 03:12 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
|
|