Not like any other distro i’ve known, Ubuntu using uid and gid start from 1000 rather than 500 such as on klixs, fedora, mageia and any other else, even mac osx lion. This could be problematic if you were dual booting or using many sftp transfering files on network between them, because you had to chown-ing everytime you worked on that file.
I have to install ubuntu for some project at office on my new lappy (core i3 HNM axioo) and triple boot with my i586 & x86_64 klixs installation, so I have to deal with this sooner or later because i don’t want to have a separate home and working folder just for this ubuntu things.
Finally, I manage how to change the uid and gui on ubuntu system, and here is the step :
- Create a new admin user using user account manager, logout and log back in using that account
- Open terminal and invoke this command to change uid and gid :
usermod -u501 jfdesign
groupmod -g501 jfdesign
(don’t forget to change jfdesign with your username, and adjust 501 with the the number you want) - Now, it’s time to change the owner of each file :
find / -uid 1001 -exec chown 501 ‘{}’ +
find / -gid 1001 -exec chgrp 501 ‘{}’ +
(better do this on fresh install or you’ll have to wait very long)
With that steps the uid and gid of all your files is perfectly aligned, but there is two more problem to solve, … yes, the gdm/lightdm login issue and the unity desktop issue. Ubuntu will hide any user below uid 1000 and also it will show invalid utf-8 on user menu in unity desktop. To make it worse, even your username will not shown up on user manager list. 😀
Here is how to fix that :
edit file /etc/login.defs with your favourite editor and find and replace this line :
UID_MINÂ Â 500
GID_MINÂ Â 500
after reboot it’s all done, now you can copy across network and between partition with the same exact uid and gid.
Note :
you have to add sudo for each command above if you using sudo, i don’t use sudo here, sudo is evil.