Removed openhab user from all other groups and added to i2c by mistake

  • Platform information:
    • Hardware:RASPBERRY PI ZERO W/512MB RAM/16GB CLASS 10 CARD
    • OS: OPENHAB 2.4, OPENHABIAN
  • Issue of the topic: By Mistake Run Command sudo usermod -G i2c openhab

Later i found need to run sudo usermod -a -G i2c openhab

I was having issue while accessing python script from user openhab

so I Ran Command from search results found on google and i am little nervous that i removed openhab from all other groups and added only to i2c.

Now how can i revert or undo changes ? what are the default groups to which openhab user belongs ?

Please advise.

At a minimum openhab should also be a member of the openhab group. If you are using a USB thumb drive it needs to also be a member of dialout. Beyond that I don’t think there are any other groups it needs to be a member of. If you use the GPIO binding it needs to be a member of gpio. If you use a bluetooth binding it should be a member of bluetooth. If you use say or an audio sink on that server it needs to be a member of audio. Finally, it might need to be a member of tty to use the Exec binding or executeCommandLine, though I could be wrong about that.