Lost access to a user profile
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Lost access to a user profile
Following a site about changing the hostname, in my etc folder, I've changed the hostname in files "hostname" and "hosts" using the root terminal. Later after I rebooted my system, Linux Mint didn't offer me to log in with my account, but instead, it forced me to create a new one. When I did so, it loaded into a fresh new account as if I never used Linux Mint before. I know I probably shouldn't have tampered with the root terminal, but is there some way to recover my previous account? I lost all my files thanks to this foolishness of mine.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Lost access to a user profile
Did you check the /home directory to see if you original account was there?
Code: Select all
ls -l /home
sudo ls - l /home/original_account
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: Lost access to a user profile
Can't say what happened to your files because we don't know what commands you ran (maybe check the
history
of the root user), it's possible you just moved them elsewhere or mounted a different path to /home
, but just for reference, the proper way to change your hostname is (in a non-root terminal of an admin user):
Code: Select all
hostnamectl set-hostname YOURNEWNAME
Re: Lost access to a user profile
How quickly do you need to get your files back? If you have a dead line to meet then you should use your backups to restore the files you needed. Otherwise, we can try to work through and make some sense out of this situation.
Please post the output from the following commands:
How did Linux Mint force you to create a new account? Do you mean you had to manually create a new account? Or did it go through the same set of questions like you were doing a fresh install? Please be very specific with your response.Later after I rebooted my system, Linux Mint didn't offer me to log in with my account, but instead, it forced me to create a new one. When I did so, it loaded into a fresh new account as if I never used Linux Mint before.
Please post the output from the following commands:
Code: Select all
lsblk -So +size
lsblk -f
cat /etc/fstab
df -h
sudo ls -lAd /home
sudo ls -lAd /home/*
sudo ls -l /var/log/installer/syslog
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: Lost access to a user profile
Sorry for the lack of details. I had to go through a set of questions, but didn't have to install the OS (so I wasn't asked to create any partitions etc.). The questions were only regarding my internet access, name, hostname etc.
As for the commands, the results:
lsblk -So +size
lsblk -f
cat /etc/fstab
df -h
sudo ls -lAd /home
sudo ls -lAd /home/*
sudo ls -l /var/log/installer/syslog
As for the commands, the results:
lsblk -So +size
Code: Select all
NAME HCTL TYPE VENDOR MODEL REV TRAN SIZE
sda 0:0:0:0 disk ATA TOSHIBA MQ04ABF1 0J sata 931,5G
sdb 1:0:0:0 disk ATA TOSHIBA THNSNK12 4102 sata 119,2G
Code: Select all
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs DATA 01D55BF40A027A20 /media/simakma5/DATA
├─sda2 ext4 f5b20dcb-e17d-4885-8048-ab0d0de4db24 /
├─sda3 swap 767dc06b-a062-452f-8b5e-a5009d94f050 [SWAP]
└─sda4 ext4 fc13971e-12d0-47f5-a5a1-e9ace77fc93e /home
sdb
├─sdb1 vfat SYSTEM 64BA-DA0A /boot/efi
├─sdb2
├─sdb3 ntfs WIN 01D4F0F080C8FD60
└─sdb5 ntfs RECOVERY 7A4642DE46429B31
Code: Select all
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=f5b20dcb-e17d-4885-8048-ab0d0de4db24 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sdb1 during installation
UUID=64BA-DA0A /boot/efi vfat umask=0077 0 1
# /home was on /dev/sda4 during installation
UUID=fc13971e-12d0-47f5-a5a1-e9ace77fc93e /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=767dc06b-a062-452f-8b5e-a5009d94f050 none swap sw 0 0
Code: Select all
Filesystem Size Used Avail Use% Mounted on
udev 3,9G 0 3,9G 0% /dev
tmpfs 787M 1,6M 785M 1% /run
/dev/sda2 20G 7,3G 12G 40% /
tmpfs 3,9G 114M 3,8G 3% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/sdb1 256M 31M 226M 12% /boot/efi
/dev/sda4 121G 786M 114G 1% /home
tmpfs 787M 68K 787M 1% /run/user/1000
/dev/sda1 781G 443G 339G 57% /media/simakma5/DATA
Code: Select all
drwxr-xr-x 4 root root 4096 Aug 27 01:23 /home
Code: Select all
drwx------ 2 root root 16384 Aug 26 14:06 /home/lost+found
drwxr-xr-x 27 simakma5 simakma5 4096 Aug 27 09:48 /home/simakma5
Code: Select all
-rw------- 1 syslog adm 500218 Aug 26 14:17 /var/log/installer/syslog
Re: Lost access to a user profile
Thank you very much, that's for the next time!gm10 wrote: ⤴Tue Aug 27, 2019 4:05 am Can't say what happened to your files because we don't know what commands you ran (maybe check thehistory
of the root user), it's possible you just moved them elsewhere or mounted a different path to/home
, but just for reference, the proper way to change your hostname is (in a non-root terminal of an admin user):Code: Select all
hostnamectl set-hostname YOURNEWNAME
Re: Lost access to a user profile
Alright guys, thank you so much for your quick and very good responses. Anyway, I've managed to recover almost all of my files (and more importantly, all the important ones) simply by finding an internet backup I've made a few days ago and I'll just go with using the new account into which I've already imported all the previous files.
Re: Lost access to a user profile
It looks like you did an installation on 20190826 around 14:10.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️