You are not logged in.

#1 2023-07-07 21:08:01

Haigee
Member
Registered: 2023-07-07
Posts: 2

Passwords and users autodeleted on dualboot after inactivity [SOLVED]

Hi, I managed to set up a functioning arch installation on my windows computer as a dual boot, with internet access window mananger and all. But I stopped using it due to my inexperience. I wanted to try and learn arch again so I entered it but to my suprise my login did not work any longer. I had my password and username written down and I could not log in through root either (tty4).
So I plugged in my installation disk and checked "nano /etc/passwd" but to my astonishment my user was completely missing! So I made a new one (with hopes that my settings and files would be preserved in some way) and restarted the computer. I typed my new login in and it did not work, I used my reseted root password to try and get in that way but to no avail either.
After another restart I noticed my new user was missing as well. I saw that people said that users with no presence in /etc/shadow get autodeleted but when I made a new user the salted password was there so that could not have been the culprit. After a ton of searching I could not find out why my users and passwords kept getting reset. This was my line by line attempt at seeing if my user would stay:


//Entry

passwd //Set a temporary new password for root 
123 
123 
adduser -m test //Add new user to test 
passwd test 
123 
123 
nano /etc/passwd //Check if user is active  
nano /etc/shadow //Check if root and user have salted passwords 
sync 
exit 

//RESTART 

//Entry

nano /etc/passwd //User is missing 
nano /etc/shadow //Root password has been reset 

This was the last thing I did before I went here, but I checked a lot more than that. I looked at the partition structure and the bin folders and did not see any changes since when I did the installation and most importantly the hostname is still the one I set it to. So if I boot up linux it greets me with the hostname I set. So somehow that did not get reset for some reason. I have my suspiciouns on windows having done something to my partition or folder structure during the 2 months I did not use arch, but it's at least somewhat reassuring that my programs and setup seems to be intact despite the user issues.

Thanks for taking the time to read this and all help is greatly appreciated!

Last edited by Haigee (2023-07-07 21:54:08)

Offline

#2 2023-07-07 21:18:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Passwords and users autodeleted on dualboot after inactivity [SOLVED]

So I plugged in my installation disk and checked "nano /etc/passwd"

Did you chroot into the isntalled system first or did you indeed look at the passwd file on the install iso?

Offline

#3 2023-07-07 21:53:50

Haigee
Member
Registered: 2023-07-07
Posts: 2

Re: Passwords and users autodeleted on dualboot after inactivity [SOLVED]

Ok, I knew I was doing something wrong but not once did I consider that I forgot the chroot step. I was so stressed out that my files might be gone that I completely forgot about that being a posibility. Turns out I had misswritten my username on the note and had forgotten a capital letter (or done it intentionally cant remember), which I could see properly in /etc/passwd after chrooting properly. A shame someone who actually has this in a more serious sense can't gather anything usefull from this post.

Thank you so much for pointing out my obvious mistake!

Offline

#4 2023-07-07 21:55:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: Passwords and users autodeleted on dualboot after inactivity [SOLVED]

If it helps you anything, I can't read my own hand-writing after ~2 days wink

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB