The goal was to change userid, groupid to be in the same group with others.
We followed this instruction: How can I change my own user ID?
You can change it in /etc/passwd, /etc/group and /etc/shadow....
first changing passwd to user100:x:500:100:.. then changing groups file user100:x:500:100 , in shadow we did not change anything, because we did not know what to change there. After that we run the two commands below:
find / -uid 1007 -exec chown -h 500 {} + //for userid
find / -gid 1001 -exec chgrp -h 100 {} + //for group
Finally after hours of changing all the files: I log out and I could not log in with my password into my account anymore. After reboot only the guest account showed up.
Is there any chance I can get back my account and my data? I' am in the guest account now and there is no other root account or user account. Please help.
Update (after reversal):
grep user99 /mnt/hdd/ect/passwd
user99:x:1007:1001:Leo user99,,,:/home/user99:/bin/bash
and for group:
grep user99 /mnt/hdd/ect/group
dialout:x:20:user99
sudo:x:27:user99
plugdev:x:46:user99
users:x:1001:user99
user99:x:1001:
bumblebee:x:999:user99,syslog
docker:x:998:user99
lightdm
login screen by default does not display accounts whose UID is < 1000 – steeldriver Feb 23 '17 at 13:08