[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: user perms



On 6/17/22 16:29, Anssi Saari wrote:
gene heskett <gheskett@shentel.net> writes:

I just did all that, so now I have an /etc/rc.local but not an rc-local
but he changes from rc.local to rc-local in the middle. confusing.

So which is it. I originally created an rc.local, changed it to
rc-local, and back with mv.
The script file is /etc/rc.local but the systemd service name is
rc-local.

Now, I'm not aware of who heyu runs as, probably gene since I'm the
one running it and there is no user heyu.

Now, 2 new questions:

So what do I put in this rc.local to allow me, gene, to use /dev/ttyUSB0,
which has the cm11a on the other side of an fdti adaptor?
Since you seem to have the expected permissions for /dev/ttyUSB0 and
/dev/ttyUSB1 maybe you could just add gene and nut users to the dialout
group? adduser gene dialout and adduser nut dialout.

But if you really want to use rc.local then setting the group to nut
for the UPS line /dev/ttyUSB1 would work, so just

chgrp nut /dev/ttyUSB1

And then chgrp gene /dev/ttyUSB0

Hope it helps!
Absolutely the magic twanger Anssi. I put it all in rc.local, or in /etc/group
then ran rc.local for S&G, checked the devices were changed, restarted
nut-server and nut-client, works as expected, then ran "heyu info" as me
and got the expected response.

Finally, someone was not afraid to answer my questions.

Thank you Anssi, take care and stay well.

Cheers, Gene Heskett.

--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis


Reply to: