password for root <SOLVED>

Questions about the project and the distribution - obviously no support questions here please
orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

password for root <SOLVED>

Post by orvas » Fri Dec 29, 2017 1:27 pm

Hi.
What is password for root?
I have just installed Cinnamon.
I succeed to install couple of programs with my normal password but not anymore.
I succeed to edit Users and Groups with my normal password but not anymore.
users_groups.png
install_program.png
system_info.png
Last edited by orvas on Sat Dec 30, 2017 12:21 pm, edited 1 time in total.

User avatar
majpooper
Level 5
Level 5
Posts: 605
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: password for root

Post by majpooper » Fri Dec 29, 2017 1:39 pm

Unless you changed it - it is the same as the password you made for first user during the install process

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 2:52 pm

majpooper wrote:Unless you changed it - it is the same as the password you made for first user during the install process
This statement applies to Linux Mint up to and including version 18.1.

Starting with Linux Mint 18.2, Linux Mint follows the Ubuntu approach:
+ root has got no password, which prevents root from logging in directly
+ you can only gain root privileges by using sudo / gksudo / kdesudo as appropriate
Admittedly, you can revert to the old situation by assigning a password to user root.
What's New in Mint 18.2 - System improvements wrote:The root account is now locked by default. You can use sudo with your own password to become root with "sudo -i".
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 2:56 pm

I have not changed my password that I made during installation. I'm using that password in login and it works.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 3:02 pm

Hi, orvas.

Open a terminal window, please. Execute the commandline

Code: Select all

sudo passwd root
Specify a password for user root.
You may give the same password to root which you use for your own account. - But you do not have to.

Once you have assigned a password to user root, try "Users & Groups" again.

HTH,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 3:08 pm

I do not know how to use sudo / gksudo / kdesudo. Should I type some sudo command in root-directory?

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 3:17 pm

Thank you karlchen.

sudo passwd root-command does not work:
Sorry, user xx is not allowed to execute '/usr/bin/passwd root' as root on xxx-Lenovo.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 3:21 pm

Hello, orvas.

You open a terminal window.
The current working directory, when you execute the commandline which I had already given in previous post does not matter.
You enter the commandline

Code: Select all

sudo passwd root
exactly as it has been typed here.
sudo will prompt you to enter your own password.
While you type it there will be no visual feedback. So type the password and press the enter key.
Provided you have typed it correctly sudo will execute the rest of the commandline, passwd root, with root privileges.
passwd root tells the command passwd to assign a new password to user root.
You will have to type it and press enter.
You will have to type it again and press enter.

HTH,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 3:31 pm

passwrd_root.png
I have tried couple of time, my password should be correct, I can login with it.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 3:35 pm

Hello, orvas.
orvas wrote:Thank you karlchen.
sudo passwd root-command does not work:
Sorry, user xx is not allowed to execute '/usr/bin/passwd root' as root on xxx-Lenovo.
Oops, you have managed to drop your own user account from the user group "sudo".

In this case, you will not be able to use sudo (for terminal commands) and gksudo (for graphical applications).

You will have to boot your Linux Mint in recovery mode.
This will permit you to login as user root.
At the command prompt you will have to execute the commandline

Code: Select all

adduser jari sudo
Note: this assumes that on your Mint system, your login name is jari. If it is not jari, replace jari by your username.

Once you have added yourself back to the user group sudo, reboot your Mint and start it up normally.

Now try "Users & Groups" again e.g. But do not kick yourself out of the user group sudo again. :wink:

Provided everything is back to normal, then your issue has been solved.

HTH,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 3:48 pm

I admid, I have managed to drop my user account from the user group "sudo".

How can I boot Linux Mint in recovery mode?
I have safe boot password.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 4:17 pm

Hello, orvas.

Power on the machine.
Hold down the <shift> key till you see the Grub boot menu.
The first item in the list will start your Linux normally.
You do not want this at this point in time.
So move down the cursor 1 line, which reads "Advanced options for Linux Mint 18.3". Select this line. Press enter.

In the next list you will have to go down 3 lines and select it. The line which reads
Linux Mint 18.3 ... (recovery mode)
The important thing is the "recovery mode)" at the end.
Select this line and press enter.

After a while you will see a coloured Recovery Menu.
Move down the cursor till it is on the "root - Root Shell" line. Press enter.

In case you are asked for root's password, try to simply press enter. Means giving no password. On Mint 18.3 this should work on a default installation.

You should see a # and right of the hash character a blinking cursor.

Type the following commandline. Yes you have to type, no way of copying and pasting anything here.
mount -o remount,rw /
Type this command exactly as it as been typed here.
(It re-mounts the root filesystem in read-write mode.)

Now the commandline to add yourself back to the user group sudo.
adduser jari sudo
Type this command exactly as it as been typed here.
One exception: if your Mint username is not jari, then replace jari by your username in the commandline above.

Once this has been done, you reboot your machine by typing the command reboot

Good luck,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 4:26 pm

Thank you, I'll try this.

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 4:36 pm

<Shift> key does not work.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 4:47 pm

Hi, orvas.

Does your machine use UEFI boot?
I ask, because in order to get the steps I had done what I wrote down on my Acer Aspire One netbook. It uses Bios boot.
Getting into the Grub menu on an UEFI boot machine might work differently. Don't know. No UEFI boot here still.

Moreover. Current machines are really fast when starting up. So you must make sure that you press the <Shift> key and keep it pressed, right after you switched on the machine. Else it may already have passed the brief timespan where you can enter the Grub menu and may be already loading the default Grub menu item (Linux Mint 18.3 - in normal mode)

So, is it Bios boot or UEFI boot? - Hint: if the machine came with Windows 8.1 or 10 pre-installed, then chances are extremely high that it is UEFI boot. In this case my <shift> key step may not apply.

Regards,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 4:58 pm

My computer is brand new and Linux Mint is downloaded couple days ago. USB boot from ISO file. In this computer there was Windows 10. I have overwrite it with Linux. Only Linux Mint in my computer. If I remember correct it was F10 or F12 when I booted from USB.

User avatar
karlchen
Level 19
Level 19
Posts: 9192
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: password for root

Post by karlchen » Fri Dec 29, 2017 5:06 pm

Hi, orvas.

Then your machine will very very likely use (U)EFI boot. About which I have no practical knowledge.
I am a bit loathe to try and explain what I have only read in more recent articles (2016/2017) on "getting into the Grub menu on (U)EFI boot systems". Because if I give an incorrect piece of advice on something which I may have understood incompletely, the risk is that following my advice may cause problems on your machine.
So I suggest to practice some patience exercise and wait a bit. I would be amazed if no-one here in the forums had (U)EFI boot and knew how to enter the Grub menu there.

Best regards,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 5:08 pm

Shift, Esc, F10 does not work.
F12: there is boot menu but not recovery option. Ubuntu and EFI only.

Pippin
Level 3
Level 3
Posts: 144
Joined: Wed Dec 13, 2017 11:14 am
Location: NL/DE/TH

Re: password for root

Post by Pippin » Fri Dec 29, 2017 5:09 pm

I think you should try the "esc" button.
"One good thing about music, when it hits you feel no pain.”
B.M.

orvas
Level 1
Level 1
Posts: 18
Joined: Fri Dec 29, 2017 11:00 am

Re: password for root

Post by orvas » Fri Dec 29, 2017 5:11 pm

Thank you karlchen. Now I know anyway what's wrong in my computer. I'm sure somebody knows how to boot my computer in recovery mode.
Ecs does not work.

Post Reply

Return to “Non-technical Questions”