User and Group ID mismatch

I was using Lubuntu 18 and wanted to upgrade to 20, but it doesn’t allow me to upgrade directly, so I reinstalled with 20.10. However, I noticed that it created my first account with user id 1000 and group id 1001. Other users I added then have 1001.1002, 1002.1003, etc. This messes up my files on other partitions. It will also cause problems if I have to go back to older versions.

I read in another thread that another user saw that sambashare was using gid 1001. Is this the new behavior of Lubuntu/Ubuntu? How do I fix this so that I don’t have to go change all the ids of all the existing files.

thanks a lot.

Oh, I should add also that I tried 20.04 as well and it has the same issue.

This is normal behaviour on Lubuntu 18.10 and later installations (I have no experience with earlier versions).
Why would it be a problem? Are you using UID/GID in filenames?

I have many files that are on other partitions that I simply remount onto new installations. However, since the group ids have changed, the files no longer have the correct group ids.

It isn’t an intended feature. There is a bug report. It stems from an issue that is now resolved in Calamares. Unfortunately it has only recently landed and we need to modify our configuration so that the sambashare user is a system user. It should land soon in 21.04, Hirsute Hippo which is scheduled to be released in April.


Please educate me on why this is an issue. I thought that there’s a 1:1 relationship between group name and gid. But perhaps my view is too simple here.

In the earlier versions of Calamares the sambashare group gets created before the regular user and associated group. Since sambashare only has a GID it gets 1000 and that leaves UID 1000 open for the first user but GID 1000 is already taken so users get 1001 and so on. The new method creates sambashare as a system user so the GID is < 1000 and that leaves GID and UID open for users.


A post was split to a new topic: Sambashare fixes

I have many files that were created on older installations, which I simply mount them with new installations. These files have groupid = userid in the old installation. For example, the files created under the first user (call it user1) and second user (call it user2) in the old installation would have ownership 1000.1000 and 1001.1001 respectively. Seen in the new installation, the files that belong to user2 in the old installation would have owner user2 (1001) but group user1 (1001). I can certainly fix the issue in the new installation, but I would lose the ability to easily do archiving and restoration of files (using rsync for example), and I would have to do the reverse “fixing” if I were to go back to an older installation.

I didn’t realize that it started in Lubuntu 18.10 as I simply upgraded the system rather than installing from scratch. It was when I installed 12.10 from scratch that I saw this problem due to release upgrade refusing to do that. That might be why I did not see this problem until now.

Some people like me like to keep the /home directory as a partition separate from the / directory. So, I simply mount the home partition onto different installations and still be able to keep most things the same and without having to copy home directories over. When the group ids change, it messes up the integrity of the files in the each user’s directories.

While we wait on a fix for new installations, we’re looking at solutions for an existing one. That said…


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.