Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Why is user GID 1004?  (Read 4519 times)

Offline sunrat

  • User
  • Posts: 406
[EN] Why is user GID 1004?
« on: 2020/03/01, 00:53:46 »
In almost every other Linux system I have encountered, the GID of the first user is 1000. In siduction it always seems to be 1004. Is there a reason for this and can it be changed to 1000 without FUBAR the system? GID 1000 is allocated to fuse group.
It's not a big problem but I may have occasionally had permissions issues when moving files to a different system. Most recently I had some weird conflicts in Syncthing when syncing to a Debian Buster system which may or may not have been due to this.
Cheers.

Code: [Select]
roger@siduction-brain2:~$ id
uid=1000(roger) gid=1004(roger) groups=1004(roger),7(lp),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),101(systemd-journal),111(kvm),117(lpadmin),119(netdev),121(bluetooth),122(scanner),1000(fuse),1001(powerdev),1002(storage)

Offline der_bud

  • User
  • Posts: 1.072
  • member
Re: Why is user GID 1004?
« Reply #1 on: 2020/03/01, 12:26:59 »
.. . In siduction it always seems to be 1004. Is there a reason for this and can it be changed to 1000 without FUBAR the system? GID 1000 is allocated to fuse group. ...

That's really strange. Me using siduction since the beginning (and sidux and aptosid) and have never seen this, UID and GID always 1000 here.
Code: [Select]
martin@T530:~$  id
uid=1000(martin) gid=1000(martin) Gruppen=1000(martin),6(disk),7(lp),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),33(www-data),44(video),46(plugdev),100(users),101(systemd-journal),109(lpadmin),110(netdev),116(scanner),128(vboxusers),129(kvm)
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline ayla

  • User
  • Posts: 1.744
Re: Why is user GID 1004?
« Reply #2 on: 2020/03/01, 12:47:21 »
hmmm...
Code: [Select]
cal@siducer:~$ id
uid=1000(cal) gid=1005(cal) Gruppen=1005(cal),7(lp),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),101(systemd-journal),109(kvm),114(lpadmin),116(netdev),118(bluetooth),121(scanner),1000(fuse),1001(powerdev),1002(storage),1003(vboxusers),1004(autologin)

Offline gnasch

  • User
  • Posts: 63
Re: Why is user GID 1004?
« Reply #3 on: 2020/03/02, 16:22:54 »
I always have similar problems as I use a NAS and I need the same ID on the PCs and the NAS.
So change it as root:

Code: [Select]
pwunconv
grpunconv
edit /etc/passwd to allocate yourself the desired ID p.ex: 1004:1004 -->1000:1000
grpconv
pwconv
cd /home
chown -Rv cg:cg /home/cg

personally I use 1026:100 because my users are all in group "users"

HTH, gnasch

Offline finotti

  • User
  • Posts: 272
Re: Why is user GID 1004?
« Reply #4 on: 2020/03/02, 17:42:56 »
FWIW: my recent install (past month) of siduction did create the user with UID 1000 and GID 1004.

Offline unklarer

  • User
  • Posts: 817
Re: Why is user GID 1004?
« Reply #5 on: 2020/03/02, 19:48:41 »

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: Why is user GID 1004?
« Reply #6 on: 2020/03/02, 20:09:56 »
Same as ayla, I am GID 1005 on my siduction systems.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline sunrat

  • User
  • Posts: 406
Re: Why is user GID 1004?
« Reply #7 on: 2020/03/03, 02:53:27 »
OK I changed it! Here's how:

First checked files in ~ not with group ownership same as user:
Code: [Select]
$ find . ! -group roger |wc -l
26450
$ find . ! -user roger |wc -l
0
$ find . -group fuse |wc -l
26450
All files owned by me and those not in my group are in fuse group which I want to change along with changing my GID.

Check all GIDs:
Code: [Select]
$ getent groupShows "roger" is GID 1004 and "fuse" is GID 1000.

Change "fuse" to unused GID:
Code: [Select]
root@siduction-brain2:~# groupmod -g 1005 fuse
Change "roger" to now unused GID 1000:
Code: [Select]
root@siduction-brain2:~# groupmod -g 1000 roger
Change file group ownership:
Code: [Select]
root@siduction-brain2:~# find /home/roger/ -user 1000 -exec chgrp -h roger {} \;Note this last step may be not even necessary. Will report back if I have issues.
getent group now reports roger is 1000 and fuse is 1005.

So far, after a quick reboot and opening a few applications, all seems copacetic!  8)
« Last Edit: 2020/03/03, 03:05:06 by sunrat »