Page 1 of 1

Adding a user to a group

Posted: 28 Jan 2018, 20:32
by mr_hero
Hello,
I know it sounds strange but I can't add the guest-user to any group in porteus. I am trying to set-up my scanner in porteus and iscan can't connect to the USB-port. Also, the arduino-software can't connect to the usb2serial-adapter I use. I need to start arduino as root to get access.
So when I type

Code: Select all

sudo usermod -a -G dialout,lp,scanner guest
to add the guest-user to the dialout-group (used by /dev/ttyUSBxx), the lp-group (used by the epkowa-driver for the usb-scanner) and the scanner-group I get this:

Code: Select all

sudo: usermod: Unknown command
When I type it directly in a root-terminal (without sudo) it seems to work but the user doesn't get added to these groups.

When I type

Code: Select all

id
in a guest-terminal, afterwards I always get the same:

Code: Select all

uid=1000(guest) gid=100(users) Gruppen=100(users),93(scanner),1000(vbox)
So I thought "maybe the groups don't exist" and tried creating them in a root-terminal:

Code: Select all

# groupadd dialout
and

Code: Select all

# groupadd lp
and

Code: Select all

# groupadd scanner
...but I always got an error-message that the group already exists. However, when I type in a root-terminal:

Code: Select all

groups
I get:

Code: Select all

root scanner vbox
In a guest-terminal I get:

Code: Select all

users scanner vbox
So...what is going wrong here?

Adding a user to a group

Posted: 28 Jan 2018, 22:23
by brokenman
You need to add the groups and users as root.
You need to check the groups as guest.

Adding a user to a group

Posted: 29 Jan 2018, 11:35
by mr_hero
yep, that did the trick. Thank you!

Still strange:
when typing

Code: Select all

groups
in a root-terminal, it doesn't show me the "new" groups. In a guest-terminal I can see the groups now. Also strange: sudo seems to have problems with group/user-operations.