Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
85
rated 0 times [  85] [ 0]  / answers: 1 / hits: 298561  / 2 Years ago, sat, november 5, 2022, 10:49:40

I have an Ubuntu 11.10 system with 2 users:




  • The first was created during the installation

  • The second instead was created after. It belongs to the sudoers group.



Now the problem is that when the second tries to use a device ttyUSB0 the following error is returned:



"Could not open serial port /dev/ttyUSB0"


I was able to fix it by using:



sudo chown :second_user /dev/ttyUSB0


However when I disconnect the device and reconnect it the problem comes back.



Is there a way to allow different users to access the devices?
I suppose I have to add the user to a specific group. Currently the owner is root and the group is dialout. However I'm not sure about the group and I don't know how to add the user.



Thanks!


More From » usb

 Answers
6

As you've noticed, the /dev/ttyUSB0 device has the group of dialout. All you need to do is add the second user to the dialout group:



sudo adduser second_user dialout


second_user will need to log out & log back in again for this to take effect.


[#39879] Monday, November 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breadoules

Total Points: 212
Total Questions: 118
Total Answers: 120

Location: Dominica
Member since Mon, Jun 22, 2020
4 Years ago
;