How to Change/Recover admin/root/user password LM Cinnamon 18.3

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

Hello Fellow Mint User,
Please help me out.

Desktop PC: LM Cinnamon 18.3
Home directory/files Not encrypted.
There is only one user.
A single mode os.
Originally the system had one single same password for admin = root = user.

Problem: On reboot/restart not able to log into system (many times tested without success). I know 100% my username and password, but system disables me to log in on restart.

How I have tried to resolve problem (without any success): Googled and found a long list of various solutions but NONE is working for me.
1) One group of solutions instruct to: reboot, enter Grub menu, select normal Linux, press 'e', replace "ro quiet splash ..." (or advice "quit splash", while another to just insert) with "rw init=/bin/bash", to F10 and after on cmd: $>cat /etc/passwd (else: $>ls /home) to find/confirm username and next to $>passwd <username> and after change of pass to reboot $>reboot.
2) Another group of solutions that did NOT help in my case is after Reboot to enter GRUB menu -> select Recovery mode -> Root shell prompt (while other sites suggested to select Remount or Fsck) and next to reset password as in (1) above.

Steps I have taken and Observations:
1) I have tried very many solutions on the internet/Google/Linux Forum but without success.
2) On /etc/fstab I have removed the mounting of /home and restarted/rebooted and was able to log in perfectly well !!!
3) I set back in /etc/fstab for mounting Home and on Reboot I'm not able to log into the system.

Questions:
1) Any suggestions on why I'm not able to effectively Change my admin/root/user password and reboot into new password while boot ing into system that mounts also Home.
2) Any suggestions how can I Change my admin/root/user password :roll:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

AnnisMonadjem wrote: Sun Oct 21, 2018 9:12 pm u]Problem:[/u] On reboot/restart not able to log into system (many times tested without success). I know 100% my username and password, but system disables me to log in on restart.
Please expand on the symptoms. Does it kick you back to your login screen with no visual feedback or does it tell you the password is wrong?

Can you remember if you changed anything, installed software or applied updates immediately prior to the issue manifesting?
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
Pierre
Level 21
Level 21
Posts: 13228
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by Pierre »

that 1st solution, where you change your password, from the Grub Menu & then edit that command line:
- is the generally accepted way to change the unknown password, to your known password,
& then continue to boot into your /home partition.

what error - if any - did you get, after doing that ? why didn't that work ?.,
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!.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

Hi smurphos | Hi Pierre :
smurphos: Please expand on the symptoms. Does it kick you back to your login screen with no visual feedback or does it tell you the password is wrong?
Can you remember if you changed anything, installed software or applied updates immediately prior to the issue manifesting?
Pierre: that 1st solution, where you change your password, from the Grub Menu & then edit that command line:
- is the generally accepted way to change the unknown password, to your known password,
& then continue to boot into your /home partition.
what error - if any - did you get, after doing that ? why didn't that work ?.,
It doesn't kick me back to login screen - it just tell's me that password is wrong and I can repeatedly type in again user name and password.

And, yes, I do remember that I had a ~500MB partition on same disk (of 1TB) as for a temporary backup, where i would archive Timeshift (the other 500MB partition was assigned to system Linux). For a year or so, things were ok, but eventually, I ended short on space on the archive partition, so i decided to completely delete the archive, but I left the partition untouched. I deleted the archives from within Timeshift and everything went smoothly and nice. The problem started after I rebooted the pc and that was the first time when I was faced with the above password issue.

When i realized the severity of the problem and that I cannot recover the password, my next thought was to reinstall LM. I had Cinnamon 18.3 installation disk and so i went on with reinstalling it only on the system partition, not on entire disk. But this did not fix it, so I tried reinstalling on system partition Xfce 18.3 and problem did not go away.

In meantime I was trying existing LM Forum solutions and none was helpful.

In the process, I observed something very strange of which I wrote in my first post and I am repeating it here. The password problem only happens when I have my HOME folder attached (which I do thru /etc/fstab), but when it is not then the password problem goes away and I am able to log-in without any problem.

I realize that the solution must be somehow here, although i don't know Linux well enough. Perhaps you can suggest some way out for which i am greatly indebted. Please help. :roll:
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

I'm intrigued by what is the system using as your home if you can login without mounting your home...

What does ls -1a / return when you are logged in in that way? And ls -1ag /home
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

smurphos wrote: Mon Oct 22, 2018 3:44 pm I'm intrigued by what is the system using as your home if you can login without mounting your home...

What does ls -1a / return when you are logged in in that way? And ls -1ag /home
What I did:
1. I use LM CD to reboot into pc.
2. modify /etc/fstab to prevent "real" /home mounting
3. reboot

Links to screenshots:
ls -1a
Just see system files - boring usual, nothing unusual.
https://www.dropbox.com/s/v9m1i21pt7wg8 ... 3.png?dl=0

ls -1ag /home
Just see a typical home directory with an admin user, nothing unusual.
(on same screenshot as above)
https://www.dropbox.com/s/v9m1i21pt7wg8 ... 3.png?dl=0

ls -la /home/farhad/Documents
Documents are just plain empty as when you first install Linux.
https://www.dropbox.com/s/9sn6fgfzo4v06 ... 5.png?dl=0

lsblk -f
Data-Farhad is the device I would like to mount, but when mounted (/etc/fstab) cause the password failure.
https://www.dropbox.com/s/sshgdclmdfzpz ... 3.png?dl=0

df
I'm not seeing anything unusual
https://www.dropbox.com/s/gcennsge4qyh8 ... 3.png?dl=0

sudo gparted
239GB unallocated was were originally I had my Timeshift archive backups. Subsequently, removed archives from within Timeshift and which immediately after that started the password failure.
https://www.dropbox.com/s/k6i85wems80xs ... 5.png?dl=0

Let me know if there is anything else I can provide you with. :wink:
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

That makes sense now - so not your home partition per se but your data partition. What happens if you log in, change the fstab tab back to it should automount and run sudo mount -a

Also when you are logged in can you open Timeshift and check was it has listed as it's Location for snapshots?
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

That makes sense now - so not your home partition per se but your data partition. What happens if you log in, change the fstab tab back to it should automount and run sudo mount -a

Also when you are logged in can you open Timeshift and check was it has listed as it's Location for snapshots?
  • Loged-in
  • Changed fstab to automount and saved.
  • Ran sudo mount -a
  • /home mounted with all files nicely.
  • Timeshift stopped responding and tried many times, but nothing, so bec. i do not need and archives are empty i ran sudo apt purge timeshift
  • Rebooted, but noted same behavior as before - system does not allow me to log in with my password.
  • Again, the only way i can log in is as before: is to use CD installation disk to remove automount of fstab, reboot and then it autologs me at start with no problem.
I am ending up at same problem as i described in my first post.
What can be done ? Please help. :|
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

Can you post your fstab? Both as is when you can't log in and as is when you can? cat /etc/fstab

I'm hoping someone else weighs in on this thread...I don't recall ever seeing anything like this before.

By the way you don't need to post screenshots. Just copy the terminal output and paste into your reply in between [code][/code] tags.

E.g. my fstab...

Code: Select all

$ cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>

UUID=7df4bd9f-2d2b-4cb3-90de-7930ad20cdd5	/                	ext4	noatime,errors=remount-ro	0	1
UUID=c164f9a5-9e11-41a9-b98b-e162fc5b1a9a	/home            	ext4	noatime,defaults         	0	2
UUID=7f5c52d4-a3ee-44b1-bbbe-230bdb1e6d13	/mnt/backup_drive	ext4	defaults,nofail  	0	0
UUID=62e134d6-6d08-4119-8b02-f3ba9edd7c96       /mnt/timeshift		ext4	defaults,nofail		0	0	
/swapfile                                	none             	swap	sw               	0	0
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

smurphos wrote: Tue Oct 23, 2018 1:01 pm Can you post your fstab? Both as is when you can't log in and as is when you can? cat /etc/fstab

I'm hoping someone else weighs in on this thread...I don't recall ever seeing anything like this before.

By the way you don't need to post screenshots. Just copy the terminal output and paste into your reply in between [code][/code] tags.
You Can Login: cat /etc/fstab

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=1b93b10b-d3e6-4860-995c-afea1ae02eb1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=8614133c-6929-428f-a8c0-e3a964cceb2b none            swap    sw              0       0

# THIS IS THE /home THAT IS GIVING TROUBLE WITH LOGIN:
# UUID=2a783635-0d2a-4a8d-9d27-6188f9f57819 /home           ext4    defaults         0       2

You CanNOT Login: cat /etc/fstab

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=1b93b10b-d3e6-4860-995c-afea1ae02eb1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=8614133c-6929-428f-a8c0-e3a964cceb2b none            swap    sw              0       0

# THIS IS THE /home THAT IS GIVING TROUBLE WITH LOGIN:
UUID=2a783635-0d2a-4a8d-9d27-6188f9f57819 /home           ext4    defaults         0       2

So as you see the difference is marginal - the only difference is whether the last line is commented or not !

@smorphos Really appreciate your perseverance! I also never have seen this type of bug.
Was just thinking could it perhaps be that the passwd and profile of 'farhad' user on Data-Farhad partition might not exactly match the details i have been entering as i installed the new system partition and bec of it when /home now is auto-mounted it refuses to login ? does this make any sense ? The problem is that my knowledge of Linux ends here and i wouldn't know what even to search/look for. You suggestions and guidance are terribly valuable to me. Hope, pls, you give at least some hints what i could possibly do next. :roll:
User avatar
JerryF
Level 16
Level 16
Posts: 6572
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by JerryF »

Can you post the result of the following commands:

Code: Select all

lsblk --fs
and

Code: Select all

blkid
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

AnnisMonadjem wrote: Tue Oct 23, 2018 2:52 pm @smorphos Really appreciate your perseverance! I also never have seen this type of bug.
Was just thinking could it perhaps be that the passwd and profile of 'farhad' user on Data-Farhad partition might not exactly match the details i have been entering as i installed the new system partition and bec of it when /home now is auto-mounted it refuses to login ? does this make any sense ? The problem is that my knowledge of Linux ends here and i wouldn't know what even to search/look for. You suggestions and guidance are terribly valuable to me. Hope, pls, you give at least some hints what i could possibly do next. :roll:
It makes sense that there is something in your /home that is causing an issue. I don't think it's the password per se - that's stored in a hashed format in /etc/shadow. I understand now that you are actually mounting that partition as home and not as as a separate data partition - your partition label threw me... :roll: :wink:

There are some quick fixes you can try....run the routine of logging in with home not mounted then mounting it once logged in. Then in a terminal check the home folder for ownership issues.

find $HOME ! -user $USER will report back any files that are not owned by your user. If there is output run sudo chown -Rc $USER:$USER $HOME to fix. Leave the fstab with /home set to mount and reboot.

If that doesn't help then do the same thing again but once you've got /home mounted run rm ~/.Xauthority ~/.ICEauthority and immediately reboot.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

JerryF wrote: Tue Oct 23, 2018 6:06 pm Can you post the result of the following commands:

Code: Select all

lsblk --fs
and

Code: Select all

blkid
When I canNOT login (using LM installation CD. Prior to rebooting /etc/fstab has been set to mount data partition to /home):

mint@mint ~ $ lsblk --fs
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0 iso9660 Linux Mint 18.3 Cinnamon 64-bit 2017-11-24-13-25-42-00 /cdrom
loop0 squashfs /rofs
sda
├─sda2
├─sda5 swap 8614133c-6929-428f-a8c0-e3a964cceb2b [SWAP]
├─sda1 ext4 1b93b10b-d3e6-4860-995c-afea1ae02eb1
└─sda6 ext4 Data-Farhad 2a783635-0d2a-4a8d-9d27-6188f9f57819

mint@mint ~ $ blkid
/dev/sda1: UUID="1b93b10b-d3e6-4860-995c-afea1ae02eb1" TYPE="ext4" PTTYPE="dos" PARTUUID="0387e4be-01"
/dev/sda6: LABEL="Data-Farhad" UUID="2a783635-0d2a-4a8d-9d27-6188f9f57819" TYPE="ext4" PARTUUID="0387e4be-06"
/dev/sr0: UUID="2017-11-24-13-25-42-00" LABEL="Linux Mint 18.3 Cinnamon 64-bit" TYPE="iso9660" PTUUID="7da654e6" PTTYPE="dos"
mint@mint ~ $


When I can login (and data partition is NOT mounted on /home bec /etc/fstab has been commented out) :
farhad@farhad ~ $ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0
sda
├─sda2
├─sda5 swap 8614133c-6929-428f-a8c0-e3a964cceb2b [SWAP]
├─sda1 ext4 1b93b10b-d3e6-4860-995c-afea1ae02eb1 /
└─sda6 ext4 Data-Farhad 2a783635-0d2a-4a8d-9d27-6188f9f57819


farhad@farhad ~ $ blkid
/dev/sda1: UUID="1b93b10b-d3e6-4860-995c-afea1ae02eb1" TYPE="ext4" PTTYPE="dos" PARTUUID="0387e4be-01"
/dev/sda5: UUID="8614133c-6929-428f-a8c0-e3a964cceb2b" TYPE="swap" PARTUUID="0387e4be-05"
/dev/sda6: LABEL="Data-Farhad" UUID="2a783635-0d2a-4a8d-9d27-6188f9f57819" TYPE="ext4" PARTUUID="0387e4be-06"
farhad@farhad ~ $

@JerryF let me know if you need anything else. Your assistance is greatly appreciated. :roll:
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

smurphos wrote: Wed Oct 24, 2018 12:38 am There are some quick fixes you can try....run the routine of logging in with home not mounted then mounting it once logged in. Then in a terminal check the home folder for ownership issues.

find $HOME ! -user $USER will report back any files that are not owned by your user. If there is output run sudo chown -Rc $USER:$USER $HOME to fix. Leave the fstab with /home set to mount and reboot.

If that doesn't help then do the same thing again but once you've got /home mounted run rm ~/.Xauthority ~/.ICEauthority and immediately reboot.
  • Steps taken:
    • find $HOME ! -user $USER did report back 3 files that were not owned by $USER.
    • sudo chown -Rc $USER:$USER $HOME to fix.
    • Left fstab with /home set to mount and rebooted.
    Outcome:
    Problem with password not login me in is persisting - same issue, same problem.
  • Steps taken:
    • Repeated same procedure as above - this time no files reported (all files are owned by $USER).
    • Left fstab with /home set to mount and rebooted.
    • rm ~/.Xauthority ~/.ICEauthority and immediately reboot.
    Outcome:
    Problem with password not login me in is persisting - same issue, same problem. :cry:
In your last post @smorphos, you say that this is a "quick fix". I was thinking maybe you have some more ways you could possibly approach this problem? :idea: :roll:
mediclaser
Level 4
Level 4
Posts: 492
Joined: Tue Mar 20, 2018 2:28 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by mediclaser »

Is it possible one of the keys on your keyboard is bad? Can you try typing your known password on a terminal and see if all the expected characters register?
If you're looking for a greener Linux pasture, you won't find any that is greener than Linux Mint. ;)
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

A few more ideas..

Log in with the home set to mount is fstab. But rather than logging in via the login-in screen open a virtual console with Ctrl+Alt+F1. Hopefully you will be able to login with your normal credentials there.

Check if /home and /home/farhad have successfully mounted and are read/write for their respective owners - probably easiest to run ls -1ag / && ls -1ag /home again.

If it's not mounted check dmesg output for mounting errors. dmesg | grep sda6 is probably a good grep filter to try,

Also run a file system check and then reboot fsck /dev/sda6.

If it is mounted but is read only unmount it and run a filesystem check and then reboot.

umount /home
fsck /dev/sda6

If it's mounted with correct permissions - normally drwxr-xr-x then try to start a session from there with startx - note any errors and post back....
Last edited by smurphos on Wed Oct 24, 2018 3:51 pm, edited 3 times in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

mediclaser wrote: Wed Oct 24, 2018 9:16 am Is it possible one of the keys on your keyboard is bad? Can you try typing your known password on a terminal and see if all the expected characters register?
Steps taken:
Ctrl-Alt-F1: and tried every possible key and observed that my keyboard is running fine. The keyboard has been setup as 'en-US'.
Rebooted and noted same problem as before - login problem is persisting.
AnnisMonadjem
Level 2
Level 2
Posts: 81
Joined: Sun Oct 21, 2018 8:16 pm

[SOLVED] How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by AnnisMonadjem »

smurphos wrote: Wed Oct 24, 2018 12:38 am
AnnisMonadjem wrote: Tue Oct 23, 2018 2:52 pm There are some quick fixes you can try....run the routine of logging in with home not mounted then mounting it once logged in. Then in a terminal check the home folder for ownership issues.

find $HOME ! -user $USER will report back any files that are not owned by your user. If there is output run sudo chown -Rc $USER:$USER $HOME to fix. Leave the fstab with /home set to mount and reboot.

If that doesn't help then do the same thing again but once you've got /home mounted run rm ~/.Xauthority ~/.ICEauthority and immediately reboot.
@smurphos: Thanks! The first line above was indeed the solution. Except that last time i ran it only from with mounted home.
I put your suggestions to test this time with mounted /home. Of course i could not login, so i did a Ctrl-Alt-F1 and surprisingly from here i was able to login. Well, from here on, based on your instructions, i knew what i need to do. I did a: cd $HOME and i checked for file/directory ownership: sudo find $HOME ! -user $USER and most files were set for a different user ('1001' i'm guessing these have been reset by Timeshift after i removed the archives - but why? Anyhow not a problem - i have removed it already and am not interested in it anymore). Next, I changed $HOME ownership back to the "true owner" by: sudo chown -Rc $USER:$USER $HOME. Rebooted, and was am finally to login. SOLVED. DONE. HURRA and THANK you very much indeed. :D :) 8)
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: How to Change/Recover admin/root/user password LM Cinnamon 18.3

Post by smurphos »

Got there eventually...glad you are back up and running. Note to self that these issues are easier to fix from the virtual console.... :D
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Locked

Return to “Beginner Questions”