Siduction Forum

Siduction Forum => Software - Support => Topic started by: sunrat on 2020/03/01, 00:53:46

Title: Why is user GID 1004?
Post by: sunrat 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.

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)
Title: Re: Why is user GID 1004?
Post by: der_bud on 2020/03/01, 12:26:59
Quote from: sunrat on 2020/03/01, 00:53:46.. . 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. 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)

Title: Re: Why is user GID 1004?
Post by: ayla on 2020/03/01, 12:47:21
hmmm...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)
Title: Re: Why is user GID 1004?
Post by: gnasch 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:


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
Title: Re: Why is user GID 1004?
Post by: finotti 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.
Title: Re: Why is user GID 1004?
Post by: unklarer on 2020/03/02, 19:48:41
lesen   ;D
https://www.my-it-brain.de/wordpress/tag/gid/
Title: Re: Why is user GID 1004?
Post by: dibl on 2020/03/02, 20:09:56
Same as ayla, I am GID 1005 on my siduction systems.
Title: Re: Why is user GID 1004?
Post by: sunrat 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:
$ 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:
$ getent group
Shows "roger" is GID 1004 and "fuse" is GID 1000.

Change "fuse" to unused GID:
root@siduction-brain2:~# groupmod -g 1005 fuse

Change "roger" to now unused GID 1000:
root@siduction-brain2:~# groupmod -g 1000 roger

Change file group ownership:
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)