You need to login as root first in command line mode (CTRL+ALT+F1). If the root user has no password, use
sudo passwd root to set new password.
This command chnages uid of youruser to 501:
usermod -u 501 youruser
This changes gid of youruser group to 501:
group mod -g 501 youruser
Only the first command changed your files uid in your home. So the best you can do is execute this command:
chown youruser:yourgroup /home/youruser
Notes and issues
The next issue after you changed your uid you cannot login via lightdm. You need some settings in order to be able to login with your user:
UID_MINsettings regarding to your new uid and gid settings.
- If you have any problem with your login screen, take a look to at
/usr/share/lightdm/lightdm.conf.dfolder. There are some config files that you may need to change in order to make your login screen more comfortable.
Cannot use USB mass storage
You may have some problem after this modification. If USB sticks does not mount automatically in nautilus, delete your media folder:
- Umount all media at
Delete the media folder of youruser