Saturday 3 October 2015

Permission Problems

Although I love testing new Linux distros, I've got two dedicated testing partitions on my current machine, I like to have a constant distro for my day to day computing use and my main distro of choice for a few years now has been Debian. I've noticed in recent updates over the past year that SystemD was installed as a dependency and has been updated regularly, however after some issues I decided to stick with SysVinit as it has served me well over the years and I am comfortable if I need to tweak it.

However on a recent update I realised that I no longer had permission to perform some trivial day to day tasks such as mounting drives, partitions and even rebooting or shutting down my machine.  I was asked to provide the root password each time.  I immediately thought that my user account had been removed from the various groups, but on checking I found that I was still a member of all of the groups, but didn't have the privileges they were supposed to grant me.  Following a lot of searching, I finally discovered the problem: conflicting packages between the old (SysVinit) and the new (SystemD). Well, it was actually to do with ConsoleKit and PolKit, but these are linked too.  Trying to remove SystemD was not a quick option, it has become so integrated into the desktop that I would essentially have to wipe the whole thing and build it again and blacklist the SystemD package.

So the solution that worked for me was to remove consolekit, including the package polkit-consolekit and then install systemd-sysv (this in turn required the removal of SysVinit).  Then I double checked that I had polkit installed (I think it is pulled in when SystemD is installed).

Upon restart my permissions were back to normal: I could mount and unmount drives and partitions as well as reboot and shutdown without the need of providing my root password.

Not the solution I was after, however without a complete rebuild of my system it appears that I am forced to use SystemD as my init system for the present time.