How Easy Is It To Change Or Reset A Forgotten User Password In Linux Mint As A Beginner.

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
1,626
Reaction score
1,257
Credits
11,847
Many years ago when I was using XP...I'd download a free piece of software...burn it to a CD...yes I did say CD as it was long ago and Boot to it...click a few buttons...type a new password and that was that...easy...of cause it's easy to change your known password in Linux Mint too.
m1213.gif


A few years ago I looked in to changing a forgotten password in Linux and what I found was really surprising...it wasn't easy...Youtube had heaps of videos and there are plenty of web sites explaining how to do this but the problem was...many were very complicated and some just didn't work.
m1512.gif


After much research I found two ways to do this...one is through Grub and the other with the live session...I think the live session is the easier of the two because if you make a mistake no harm is done as the directory you make in the process is not installed anywhere as it's a live session.

I was reminded of all this last week in a Thread that someone was having trouble with a password of cause we all have to learn and with some things there's no easy way to do it...what are members thoughts on this.
m1251.gif
 


If you know the root passwd or have a sudo account, it's pretty easy.
 
If you know the root passwd or have a sudo account, it's pretty easy.

Of cause it is if you know how and haven't forgot the password but what about a beginner...maybe some examples would be good.
m1203.gif
 
I remember something about replacing the password field in a file with a *, which, if I'm right, made the account passwordless.

(It's been a long time since needing such, as I keep a record in a notebook nowadays....)
 
What else is coupled to that password change on Linux distros?

(On some operating system platforms, an administrator can change a user's password or get into their account, but the user login is also coupled to a cryptographic keyring. The user's cryptographic keyring is usually configured to unlock automatically at user login time. If the administrator makes a user account password change without user cooperation, then user logins will no longer automatically unlock the cryptographic keyring. This prevents an administrator from impersonating the user online or authorizing actions from the user's account. The administrator still has access to the user's files of course, and that could be trouble enough or good enough, depending on the objective.)
 
Of cause it is if you know how and haven't forgot the password but what about a beginner...maybe some examples would be good.
m1203.gif
Here are some instructions: https://phoenixnap.com/kb/how-to-change-root-password-linux.

To redo passwords the user needs to be able to follow instructions whether a beginner or more savvy, and the instructions need to be those which apply to their operating systems. Fortunately, on most linux systems I'm familiar with the user can access a root shell through grub in a standard way such as shown in the link above, and root can set passwords for itself and any user. For more complicated security methods for password protection, I can't say, but standard installations don't appear to me to use such processes in the first instance.
 
maybe some examples would be good

If you know the root passwd.

su -
( you will be prompted for the root password here )
passwd elvis

You will be prompted for a new password.
You will have to type it in twice.

If you have sudo rights.

sudo passwd elvis

You will be prompted for a new password.
You have to type it in twice.

If you have neither, it gets quite a bit more complicated.
 
If you know the root passwd.

su -
( you will be prompted for the root password here )
passwd elvis

You will be prompted for a new password.
You will have to type it in twice.

If you have sudo rights.

sudo passwd elvis

You will be prompted for a new password.
You have to type it in twice.

If you have neither, it gets quite a bit more complicated.

Thanks for that but changing your password you know is easy...
2023-06-11-10-03.png


but what about if you forget your password...you get this...
2023-06-11-10-06.png


I think the easy way for a beginner to change or reset their forgotten password is to do it from the live session like this...
2023-06-09-06-00.png


Of cause the beginner needs to know what device the drive is using...in my case it's sda3.
I think the best thing about the live session is if you make a mistake...you don't cause any damage like choosing sda1 instead of sda3 in my case as it wont work...the same for creating the directory (mkdir) as it doesn't get created anywhere.

The other way is to go through the Grub Menu which maybe not easy for a beginner as it's on your system and making any mistake isn't good.
t1827.gif
 

Members online


Top