Complete
Details
Assignee
Vladimir VinogradenkoVladimir VinogradenkoReporter
Arno HautalaArno HautalaLabels
Impact
MediumComponents
Fix versions
Affects versions
Priority
Low
Details
Details
Assignee
Vladimir Vinogradenko
Vladimir VinogradenkoReporter
Arno Hautala
Arno HautalaLabels
Impact
Medium
Components
Fix versions
Affects versions
Priority
More fields
More fields
More fields
Katalon Platform
Katalon Platform
Katalon Platform
Created August 27, 2021 at 1:57 PM
Updated July 6, 2022 at 8:58 PM
Resolved September 14, 2021 at 4:15 PM
tl;dr How do I change the media user uid/gid?
Years ago I created a "media" group. Then FreeNAS created one and, I think, appropriately used the existing group if present. Then at some point a "media" user was created. Cut to today when I notice that I have two "media" groups (my original GID and the FreeNAS version) and a "media" user created by FreeNAS/TrueNAS.
I don't know exactly when the different users and groups were created, but I noticed this after rebooting in to 12-U5.1
I have other machines on the network that use the UID and GID that I created and I'd like to resolve this by modifying the TrueNAS entry. Plus, it seems less than ideal that I have two "media" group entries.
I can probably just delete the group that I created, but that still leaves me with the wrong UID and GID.
I note that I can't change this in the WebUI or using a middleware command:
$ sudo midclt call 'group.query' '[["gid","=",8675309]]'
[{"id": 50, "gid": 8675309, "group": "media", "builtin": true, "sudo": false, "sudo_nopasswd": false, "sudo_commands": [], "smb": false, "users": [32], "local": true, "id_type_both": false}]
$ sudo midclt call user.update 50 '{"uid": "63342"}'
[EINVAL] user_update.uid: This attribute cannot be changed
I did locate the entries in /data/freenas-v1.db and I can figure out the sql syntax to update those, but I'm hesitant to do so without understanding the consequences. Or knowing any further steps to get the system back in sync.
Should I also edit /etc/passwd and /etc/group?
Should I immediately reboot?
Would I be better off with some startup script that modifies everything (what is everything?) on each boot?
I understand some of this is my "issue" (wanting the IDs to match) and some is a bug (the duplicate group that was created). Though even the bug might be an edge case that isn't worth handling and is best left educating me how to handle it and what to look out for.
I suppose worst case I end up just modifying permissions by number and mapping those in my head, but that's certainly less than ideal.
Thanks for your help.