no root userid (solved)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
hondo
Level 1
Level 1
Posts: 7
Joined: Wed Mar 27, 2019 6:15 pm

no root userid (solved)

Post by hondo »

I just installed mint 18.03. It did not ask to install root just asked for my name and a userid. I had mint 17.2 and I had the same problem. I could do su userid and I could do most things but if I needed to log in as root.... Can I create root after install?
Last edited by hondo on Thu Apr 18, 2019 2:50 pm, edited 1 time in total.

User avatar
kevin987
Level 4
Level 4
Posts: 346
Joined: Fri Dec 11, 2015 12:35 pm

Re: no root userid

Post by kevin987 »

You're supposed to use sudo when needing elevated privileges.
Linux Mint 19.1 (Cinnamon)
LMDE 3 (Cinnamon)
GeckoLinux 150 (Cinnamon)

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

Re: no root userid

Post by karlchen »

In addition to kevin987's reply: Please, read the Ubuntu community article on RootSudo.
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

hondo
Level 1
Level 1
Posts: 7
Joined: Wed Mar 27, 2019 6:15 pm

Re: no root userid

Post by hondo »

kevin987 wrote:
Wed Mar 27, 2019 7:16 pm
You're supposed to use sudo when needing elevated privileges.
Really... oh. Read my initial comments. What about when you need to be logged in as root to change permissions?
it looks like root is there, maybe it is locked? I will look into unlocking it.

User avatar
smurphos
Level 15
Level 15
Posts: 5882
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: no root userid

Post by smurphos »

hondo wrote:
Wed Mar 27, 2019 10:58 pm
Really... oh. Read my initial comments. What about when you need to be logged in as root to change permissions?
Just use sudo chmod.

Yes root is there - on 17.x it was unlocked and had the same user password as your original user. On 18.3 (and current releases) it is there but is locked with no password set.

I can't think of any action that you could do logged in as root that you couldn't do with sudo. But if you want direct access to the root account it is just a case of giving root a password - via sudo passwd
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

User avatar
catweazel
Level 19
Level 19
Posts: 9895
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: no root userid

Post by catweazel »

hondo wrote:
Wed Mar 27, 2019 10:58 pm
Really... oh. Read my initial comments. What about when you need to be logged in as root to change permissions?
it looks like root is there, maybe it is locked? I will look into unlocking it.
There is a way to have a root user, but I'm not posting it because others with less experience and understanding might try it. I need a root user to view and manage my hardware RAID sets via a web interface on an apache webserver running on the local machine. In your use case, you can use sudo, but that doesn't help in my use case. Creating a root user is rather dangerous and should be avoided unless you're confident about your linux skills an knowledge, especially in the area of permissions because running as a root user has the potential to mess up permissions all over the place.

That said, I recommend that you thoroughly read the article linked to by karlchen... to the end.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

hondo
Level 1
Level 1
Posts: 7
Joined: Wed Mar 27, 2019 6:15 pm

Re: no root userid

Post by hondo »

There is a root user that is auto created when you install mint. It has the same password as my regular userid and you can change that. You just can't log into Mint with root. In a terminal you can log in as root with 'sudo -s'. Enter the password and you will notice the '#' in the prompt instead of '$'. You need to be logged in as root to edit files that root is the owner, such as /etc/iptables/rules.v4 and many others.

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

Re: no root userid

Post by karlchen »

hondo wrote:
Thu Apr 18, 2019 2:50 pm
There is a root user that is auto created when you install mint. It has the same password as my regular userid and you can change that.
This was only true on older Mint releases that the root user was given the same password as the first interactive user created during Linux Mint installation.
Starting with Mint 18.x the Ubuntu approach was adopted by Mint, i.e. user root cannot login interactively any longer.
hondo wrote:
Thu Apr 18, 2019 2:50 pm
You just can't log into Mint with root.
If "log into Mint with root" actually means, "you cannot log into the GUI (Cinnamon, Mate or xfce) as user root", then:
Yes, This is by design and has always been this way.
hondo wrote:
Thu Apr 18, 2019 2:50 pm
In a terminal you can log in as root with 'sudo -s'.
This is wrong. sudo will give you root permissions. sudo -i and sudo -s will give you a root shell.
But this is not the same as logging in as user root.
sudo asks for the user's password who invokes sudo, not for user root's password. A sophisticated difference which you will notice only, in case you assigned different passwords to your own account and to user root.
hondo wrote:
Thu Apr 18, 2019 2:50 pm
You need to be logged in as root to edit files that root is the owner, such as /etc/iptables/rules.v4 and many others.
This is wrong again. You need root privileges, but you do not have to log in as user root.
sudo will give you root privileges, either for a single command or for a root shell, where you can run as many commands with root privileges as you want, until you close the shell by typing "exit" and pressing the enter key.
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

Post Reply

Return to “Newbie Questions”