[mythtv-users] Group/user numbers changing on 16.04??

Mike Perkins mikep at randomtraveller.org.uk
Mon Aug 8 21:59:57 UTC 2016


On 08/08/16 20:06, Jim Abernathy wrote:
> To fix things or to upgrade to new versions of Mythbuntu, I just rebuild my boot drive and leave my Storage directory drives alone.  Same thing for network attached drives on a NAS.
> The problem is the user mythtv and group mythtv have changed numbers.  Mythtv group usesd to be 124 and mythtv user was 115.  Now on the reinstall mythtv group is now 121 and mythtv user is 123.
> This is more of an issue for NAS drives/files since I have lots of them. I can always recreate and format the storage directory drives since I don't upgrade or reinstall when there are recordings on the system.
> Is there an easy way to handle this?  I tried changing the owner and group on the NAS, but I got permissions issues even when doing it as SU.
> Jim A
>
I have encountered this problem when upgrading/reinstalling and my own solution is as follows. I 
think you could also do this as you presently don't have access to your recordings, so nothing ought 
to have been lost:

Install your OS but make it a basic Ubuntu system. Then create the mythtv group (first) and user 
(second) manually. This gives you the opportunity to specify the GID and UID, which means that you 
can make them the same as they were before.

Now you can install mythtv, and the install mechanism will re-use the user and group if they already 
exist.

The big problem you have is that the 'old' UID and GID you have given above are *system* ids; i.e. 
less than 1000 or whatever minimum mythbuntu sets. Typically, these are randomly allocated by the 
install mechanism as subsystems are installed, which means that they can be different from install 
to install.

The second big problem is that the user home directories are often in /var/lib, which means that any 
existing data ends up with the wrong UID/GID after a re-install, assuming you didn't wipe the disks. 
This can and does lead to circular references in /var as subsequent subsystem installs point to the 
wrong directories... hilarity doesn't ensue. When this happened to me I had to wipe the disk and do 
a clean install, losing everything.

Creating your own mythtv group and user means that the home directory goes under /home which means 
it is preserved over a re-install - along with all the ~/.mythtv data. For your NAS, I would 
recommend saving the mythtv user data and deleting and recreating the user with known UID and GID, 
which you can then use when you upgrade the backend/frontend machines.

-- 

Mike Perkins



More information about the mythtv-users mailing list