Change you uid bellow 1000 on Ubuntu 14.04

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

Cannot login

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:

  1. Change GID_MIN and UID_MIN settings regarding to your new uid and gid settings.
  2. If you have any problem with your login screen, take a look to at /usr/share/lightdm/lightdm.conf.d folder. 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:

  1. Umount all media at /media/youruser/
  2. Delete the media folder of youruser

    rmdir /media/youruser
    

Jozsef

Read more posts by this author.