root password

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
nirbhay57
Level 1
Level 1
Posts: 9
Joined: Thu Aug 10, 2017 3:29 pm

root password

Post by nirbhay57 » Mon Feb 05, 2018 10:25 am

I have played with my system in order to login as root automatically without requiring password.
Also the command "sudo -i" does not require any password.
Now due to security reasons , I want to revert it.
How to do it ??

User avatar
Pierre
Level 17
Level 17
Posts: 7146
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: root password

Post by Pierre » Mon Feb 05, 2018 10:28 am

well - - what did you do, to get that Root working :?:

in that the LinuxMint system, unlike some other Linux Systems,
- is designed to *not* have a working Root Account.
you can get one, as you did, but that is generally *not* recommended.
:(
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

minitux
Level 5
Level 5
Posts: 860
Joined: Tue Sep 12, 2017 10:05 am

Re: root password

Post by minitux » Mon Feb 05, 2018 10:58 am

If You have enabled root with

Code: Select all

sudo passwd root
You Can disabled with

Code: Select all

sudo passwd -l root

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

Re: root password

Post by Cosmo. » Mon Feb 05, 2018 11:04 am

A couple of questions:

Which version of Mint? (This makes a difference in this regard)

What do you mean with automatically login as root? Graphically?

Did you play with visudo?

If you do not know, what you played, how shall we know? Nobody of us sat behind you.

User avatar
Termy
Level 5
Level 5
Posts: 762
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: root password

Post by Termy » Mon Feb 05, 2018 11:21 am

Yeah, you've been far too vague there. In order to know how to revert something, it sort of helps to know what it was you did in the first place. :P
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife

nirbhay57
Level 1
Level 1
Posts: 9
Joined: Thu Aug 10, 2017 3:29 pm

Re: root password

Post by nirbhay57 » Thu Feb 08, 2018 12:28 pm

Well--I am very fond of searching things according to my requirement over the internet(generally forums.linxmint, stackoverflow.com etc).
I can't remember what I did.
I have mint18.2.
After setting the root passwords in this manner also does not work.
...................................................................................................
t2@t2-Inspiron-15-3567 ~ $ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
t2@t2-Inspiron-15-3567 ~ $ sudo -i
t2-Inspiron-15-3567 ~ #sudo passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
t2-Inspiron-15-3567 ~ # exit
logout
t2@t2-Inspiron-15-3567 ~ $ sudo -i
t2-Inspiron-15-3567 ~ #
......................................................................................................
I created a new uset t2 by the terminal command "useradd t2".
SEARCHING FOR A WAY TO REVERT IT TO PREVIOUS RELIABLE AND SECURE STATE.

User avatar
Flemur
Level 15
Level 15
Posts: 5931
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: root password

Post by Flemur » Thu Feb 08, 2018 12:35 pm

nirbhay57 wrote:
Thu Feb 08, 2018 12:28 pm
t2@t2-Inspiron-15-3567 ~ $ sudo -i
t2-Inspiron-15-3567 ~ #
After you enter the password once, you don't have to enter it again....in the same terminal (session):

Code: Select all

$ sudo ls
[sudo] password for X: 
a  bin	dat  doom
$ 
$ sudo ls
a  bin	dat  doom
$ sudo -i
ROOT! /root # 
Try closing your first terminal and open a new one and see if you need the 'sudo' password.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

nirbhay57
Level 1
Level 1
Posts: 9
Joined: Thu Aug 10, 2017 3:29 pm

Re: root password

Post by nirbhay57 » Sun Feb 11, 2018 12:05 pm

In dollar prompt, the command "sudo ls" completes successfully without asking for password.
..................................................................................
t2@t2-Inspiron-15-3567 ~ $ sudo ls
andrew ng Documents github Music python_nkp Videos
anirban_redundant Downloads jpyter Pictures spyder youtube_help.txt
Desktop g4g mml Public Templates
t2@t2-Inspiron-15-3567 ~ $

User avatar
Flemur
Level 15
Level 15
Posts: 5931
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: root password

Post by Flemur » Sun Feb 11, 2018 12:10 pm

nirbhay57 wrote:
Sun Feb 11, 2018 12:05 pm
In dollar prompt, the command "sudo ls" completes successfully without asking for password.
Yes indeed, "After you enter the password once, you don't have to enter it again....in the same terminal (session)"

Did you ....
"Try closing your first terminal and open a new one and see if you need the 'sudo' password."
??
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
Moem
Level 16
Level 16
Posts: 6233
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: root password

Post by Moem » Sun Feb 11, 2018 12:27 pm

nirbhay57 wrote:
Thu Feb 08, 2018 12:28 pm
Well--I am very fond of searching things according to my requirement over the internet(generally forums.linxmint, stackoverflow.com etc).
I can't remember what I did.
Then you didn't learn much, did you. :wink:
Maybe take notes the next time?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

JeremyB
Level 18
Level 18
Posts: 8862
Joined: Fri Feb 21, 2014 8:17 am

Re: root password

Post by JeremyB » Sun Feb 11, 2018 12:37 pm

You should look at the hidden .bash_history file in your home directory to see if there are any clues in it

User avatar
WharfRat
Level 20
Level 20
Posts: 11428
Joined: Thu Apr 07, 2011 8:15 pm

Re: root password

Post by WharfRat » Sun Feb 11, 2018 12:42 pm

nirbhay57 wrote:
Sun Feb 11, 2018 12:05 pm
In dollar prompt, the command "sudo ls" completes successfully without asking for password.
..................................................................................
t2@t2-Inspiron-15-3567 ~ $ sudo ls
andrew ng Documents github Music python_nkp Videos
anirban_redundant Downloads jpyter Pictures spyder youtube_help.txt
Desktop g4g mml Public Templates
t2@t2-Inspiron-15-3567 ~ $
What does

Code: Select all

sudo grep -w sudo /etc/sudoers
return :?:
ImageImage

Post Reply

Return to “Newbie Questions”