LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-11-2017, 04:42 AM   #1
Eddie23
LQ Newbie
 
Registered: Feb 2017
Posts: 14

Rep: Reputation: Disabled
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?
 
Old 02-11-2017, 05:02 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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. :-)
 
Old 02-11-2017, 05:25 AM   #3
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Maybe: sudo su

Welcome! Remember to *spend some time* web-researching first! Welcome!
 
Old 02-11-2017, 05:42 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by Eddie23 View Post
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.
 
Old 02-11-2017, 05:44 AM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by Jjanel View Post
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.
Old 02-19-2017, 02:16 AM   #6
Eddie23
LQ Newbie
 
Registered: Feb 2017
Posts: 14

Original Poster
Rep: Reputation: Disabled
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!
 
Old 02-19-2017, 03:01 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by Eddie23 View Post
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.
 
Old 02-19-2017, 03:17 AM   #8
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
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 03:49 AM.
 
Old 02-19-2017, 05:42 AM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by Jjanel View Post
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.
 
Old 02-19-2017, 08:22 AM   #10
Eddie23
LQ Newbie
 
Registered: Feb 2017
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
… 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??
 
Old 02-19-2017, 08:41 AM   #11
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Eddie23 View Post
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.
 
Old 02-19-2017, 10:05 AM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
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.
 
Old 02-19-2017, 10:23 AM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by hazel View Post
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)
 
Old 02-19-2017, 10:25 AM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by hydrurga View Post
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.
 
Old 02-19-2017, 10:26 AM   #15
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by hazel View Post
I'm sure that's new. Sudo-only is like systemd: it spreads by infection.
:-D Coming to a distro near you, soon.
 
  


Reply



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] My password won't allow superuser access Joe_R Linux - Newbie 5 07-29-2011 07:05 PM
About su superuser fw12 Linux - General 3 08-14-2007 02:23 PM
Superuser sakuya84 Linux - Security 2 07-15-2007 09:56 PM
Superuser CJ_Grobler Linux - Newbie 7 06-13-2005 09:35 PM
which file logs access to the superuser?mahalo pkrishna10 Linux - General 3 11-12-2004 08:07 PM

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

All times are GMT -5. The time now is 01:37 AM.

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