can I change root password

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
topboss1
Level 1
Level 1
Posts: 5
Joined: Wed Mar 16, 2016 9:05 pm

can I change root password

Post by topboss1 » Fri Nov 11, 2016 11:19 am

can I and how do I change root password in mint 18 Sarah ?

AscLinux
Level 4
Level 4
Posts: 234
Joined: Sat Oct 29, 2016 3:32 pm

Re: can I change root password

Post by AscLinux » Fri Nov 11, 2016 11:24 am

There is no root password by default. Why you need it? Generally, if you do not know how to enable root account you should not to do it.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: can I change root password

Post by Cosmo. » Fri Nov 11, 2016 6:40 pm

Mint does indeed set a password for the virtual user root during installation - in difference to Ubuntu. The password is identical with the password for the first user account. Of course it can be changed.

The really important question is, why do you want to change it? And on which places do you actually use it. As a member of the group sudo you do not need it at all.

Do you possibly want to change the password for your account?

needleroozer
Level 1
Level 1
Posts: 1
Joined: Sat Nov 12, 2016 9:21 pm

Re: can I change root password

Post by needleroozer » Sat Nov 12, 2016 9:58 pm

I can't speak for the OP, but I have a very good reason for asking this. I am trying to set up a Raspberry Pi Zero as a headless computer. To do this I need to edit some of the configuration files on the SD card. To do that, I need Linux. I have been wanting to use Linux Mint for some time, but I am not yet ready to dedicate a computer to it and do a permanent installation, nor do I want to cobble up a duel-boot just to set up the Pi. So I boot from a Linux Mint DVD and the default user - apparently the only user - is "mint", without a password. OK, but I still can't edit the files on the Pi SD card becaus they belong to root and I'm not root, I'm mint. I don't even know how to change mint's password, so even if mint were a member of sudo (which I doubt - and I don't know how to even check that) I couldn't invoke sudo because I don't know the password.

I'm at the point where I'm ready to look for some windows software that will allow me to access the Ext4 partition under Windows and edit the files there.

Frankly, while I understand the risks of logging in as root, the attitude here that "if you don't know how to do it you shouldn't" really flies in the face of the statement that "All Gurus once were Newbies". To not even answer the question of "how do I change my password" is frankly rude and makes me open to considering other operating systems. Even OpenBSD, which is openly hostile to stupid questions, provides an extensive MAN system where you can find most answers if you just look. The Linux Mint "Official User Guide" is frankly of little use.

So can someone PLEASE tell me how to change mint's password, how to make mint a member of sudo, how to activate root - whatever I need to do to edit these files? Thank you.

User avatar
jimallyn
Level 17
Level 17
Posts: 7897
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: can I change root password

Post by jimallyn » Sun Nov 13, 2016 4:50 am

man pages are also available on Mint and probably any other Linux distro for console commands and many applications. Open a terminal and type man passwd. I have changed passwords on other peoples systems a couple of times, but not enough that I have the syntax memorized. I hate to just tell people RTFM, but that's what I have to do quite often myself, so that's the best advice I can offer.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
Pjotr
Level 20
Level 20
Posts: 10158
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: can I change root password

Post by Pjotr » Sun Nov 13, 2016 6:27 am

You can change your administrator password like this: https://sites.google.com/site/easylinuxtipsproject/5
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: can I change root password

Post by Cosmo. » Sun Nov 13, 2016 10:12 am

needleroozer wrote:So can someone PLEASE tell me how to change mint's password, how to make mint a member of sudo, how to activate root - whatever I need to do to edit these files? Thank you.
There is nothing to change. Open a terminal and enter groups, no you will see, that mint belongs to the groups sudo. The password is empty (just press the Enter key) and root does exist also (otherwise the system would not work at all).

All you have to do is to open the file manager, right click in the main pane, select the command to open as root -> done.

User avatar
sbroccolo
Level 2
Level 2
Posts: 89
Joined: Wed May 10, 2017 6:59 pm
Location: Sacramento

Re: can I change root password

Post by sbroccolo » Mon Jun 05, 2017 5:44 pm

You've been warned. Logging on as Root is dangerous. But I don't believe in telling people what they can or cannot do with their own computers. So here it is:
First go into the "Login Window" Go to the Options screen and enable "Login as Root"
Then open a terminal screen and

Type the following command:

sudo passwd

The following message will appear:

[sudo] password for [username]: [Type your user password and press return]

After that another message will appear, the following:

Type new UNIX password: [Type the root password you want]

Now the last thing you need to do, the following:

Retype new UNIX password: [Retype the root password you chosen before]

The following message will appear:

passwd: password updated successfully

If the above message showed up on your terminal, you can now use the root privileges by typing:

su

And then type the password you chosen. That's it!

BrianD
Level 4
Level 4
Posts: 316
Joined: Fri Feb 12, 2010 12:22 am
Location: Tallahassee, Florida, USA

Re: can I change root password

Post by BrianD » Wed Jun 07, 2017 3:18 pm

...and that lovely MAN system you applaud from BSD is actually a holdover from Unix and is available on every Linux installation (of any stripe) that I've ever logged into.

mint@mint ~ $ MAN passwd
need I say more??

User avatar
MintBean
Level 9
Level 9
Posts: 2817
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: can I change root password

Post by MintBean » Wed Jun 07, 2017 4:03 pm

I've never yet seen a legitimate reason with Mint to login as root or change the root password and as has already been pointed out, none of the use-cases presented here have changed that point of view.

User avatar
sbroccolo
Level 2
Level 2
Posts: 89
Joined: Wed May 10, 2017 6:59 pm
Location: Sacramento

Re: can I change root password

Post by sbroccolo » Mon Jun 12, 2017 6:04 pm

There have been only two reasons that I have had to login as root. To transfer files between two different Linux installations and to reinstall grub after installing a second Linux but I wanted the grub from my "main" installation where I had already made my preferences. Yes, there are probably other ways to do it. But I find this way to be the simplest.

User avatar
simonsaysthis
Level 1
Level 1
Posts: 33
Joined: Sun Jun 11, 2017 1:39 pm
Location: Johannesburg

Re: can I change root password

Post by simonsaysthis » Tue Jun 13, 2017 4:39 pm

I only ever changed my root password once and that was because I had mistakenly captured it with CAPS lock and the thought of it somehow annoyed me. Other than that it is not good Linux practice to do things as root, especially not on a production system

acerimusdux
Level 4
Level 4
Posts: 301
Joined: Sat Dec 26, 2009 3:36 pm

Re: can I change root password

Post by acerimusdux » Wed Jun 14, 2017 3:41 am

needleroozer wrote:So can someone PLEASE tell me how to change mint's password, how to make mint a member of sudo, how to activate root - whatever I need to do to edit these files? Thank you.
sudo su

sfzombie13
Level 1
Level 1
Posts: 4
Joined: Sat Jul 15, 2017 8:38 am

Re: can I change root password

Post by sfzombie13 » Sat Jul 15, 2017 8:51 am

i came here to also find out how the root password was not set during installation and i cannot believe the answers i have read saying that you don't need to change it or that there are no reasons to login as root. this is beyond stupid and the main reason that linux malware is on the rise. as a security researcher, i know that the best way to prevent 94% (last time i read a stat on it) of all malware was to set the user of the computer to a non-admin user. you guys apparently do not understand how that works.
if it uses the same password for the root account and it is common knowledge, anyone writing malware also knows this and can elevate privileges with no effort at all. granted it isn't that hard anyway, but still, at least make an attempt at security. and there is a very good reason to login as root when doing maintenance or configuration changes. it may only be four letters extra to type, but if you login as root, you save those four letters every time and can also use the same scripts you have prepared (if you have them already done) without changing them to suit mint. realistically, i usually just sudo su, but that didn't work when i tried it with mint to get a command terminal. and as one user wrote here, i like to have full control over my system, which is the reason i use linux, along with the cost.

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

Re: can I change root password

Post by karlchen » Sat Jul 15, 2017 9:29 am

Hello, sfzombie13.

Up to and including Mint 18.1, the Linux Mint installer will assign to user "root" the same password during installation, which you have chosen for your first user account.
Up to and including Mint 18.1, the command sudo su will work. Yet, I have always used sudo -i instead.

Starting with Mint 18.2, the Linux Mint installer will follow the same approach as the Ubuntu installer. User "root" will be prevented from logging in interactively by default, because user "root" is not assigned any password.
As a consequence, in the default configuration the command su will not work, because it expects to be given the password of user "root". The command sudo -i will still work and give me a root shell.

Best regards,
Karl
Image
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: can I change root password

Post by Cosmo. » Sat Jul 15, 2017 12:01 pm

sfzombie13 wrote:i like to have full control over my system
You have full control with sudo and as a security researcher you are expected to know this.

sfzombie13
Level 1
Level 1
Posts: 4
Joined: Sat Jul 15, 2017 8:38 am

Re: can I change root password

Post by sfzombie13 » Sat Jul 15, 2017 9:29 pm

i know how to get around it, and i also know i can do everything i need by getting a root shell. what i don't like is not having a separate admin password which prevents lots of attacks by unskilled or lazy criminals. it's about not being able to login as root and do the work i need like i enjoy doing it, i hate things limiting me. the only reason i am using mint now is for the ease of my travelers at project code. i need to be able to move around in it if i have any questions, but the travelers now are young and really enjoy linux. we were using slackware which is my favorite, but were having too many issues which started to eat up class time. it was actually a blessing in disguise as we learned much more by solving the problems than if everything had gone well. check out codewv dot org and see what you think of my concept. we have had four classes now and i am still super excited to be helping out. there are two kids in there that are going to go places if they keep it up and i help them stay out of trouble on their chosen paths.

yaye
Level 4
Level 4
Posts: 235
Joined: Sat Feb 26, 2011 6:38 pm
Location: Dallas, Texas

Re: can I change root password

Post by yaye » Sun Jul 16, 2017 12:54 am

sfzombie13 wrote: what i don't like is not having a separate admin password which prevents lots of attacks by unskilled or lazy criminals.
I agree. So karlchen, with Mint 18.2 is it no longer possible to give the root account a password and login graphically as well? This is what finally drove me away from Ubuntu. If this is the case with Mint, I'll be looking for a new distro. Debian or Fedora.
Unregistered Desktop Linux User since 1998 (Redhat 5.0 "Hurricane").

User avatar
Pjotr
Level 20
Level 20
Posts: 10158
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: can I change root password

Post by Pjotr » Sun Jul 16, 2017 4:18 am

yaye wrote:is it no longer possible to give the root account a password
It is: sudo passwd

But this only makes sense for making it a bit more difficult for an attacker with physical access to your computer, to get root permissions on your machine by booting it into recovery mode.
yaye wrote: and login graphically as well?
Logging into a root desktop is beyond plain dumb. It's outright insane. Ask any experienced Linux user.
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: can I change root password

Post by Cosmo. » Sun Jul 16, 2017 5:05 am

yaye wrote:with Mint 18.2 is it no longer possible to give the root account a password
This is easy and I had described it already 3 weeks ago. This is doable with all versions of Mint.
yaye wrote:and login graphically as well? .... If this is the case with Mint, I'll be looking for a new distro. Debian or Fedora.
Do as you like to insist in a mistake. Nobody cares.

Post Reply

Return to “Other topics”