How to add user to group (dialout)

I'm having an issue add my user to the dialout group that I need to have permission on usb serial port for arduino developpment. I tried this
sudo usermod -a -G dialout <username>
sudo usermod -a -G dialout <username>
and it doesn't work.
4 Replies
nagito || Knight of Emilia
groupadd adds groups though take a look at the groups/ that own your USB device just to make sure
edwylin
edwylinOP2h ago
I tried groupadd and it told me that the group already existed but I found a solution
nagito || Knight of Emilia
sometimes the groups are named differently run as root?
edwylin
edwylinOP2h ago
I found out that it was linked to some container stuff, and I used :
grep "^dialout:" /usr/lib/group | sudo tee -a /etc/group > /dev/null
sudo usermod -aG dialout <username>
grep "^dialout:" /usr/lib/group | sudo tee -a /etc/group > /dev/null
sudo usermod -aG dialout <username>
and now when I use
groups
groups
I have
<username> wheel dialout
<username> wheel dialout

Did you find this page helpful?