waywardgeek / infnoise

The world's easiest TRNG to get right
Creative Commons Zero v1.0 Universal
723 stars 99 forks source link

infnoise won't run without increased privileges #2

Closed scruss closed 7 years ago

scruss commented 9 years ago

Any way to make infnoise run as a regular user without sudo? The less we need sudo, the better.

waywardgeek commented 9 years ago

Yes. In Ubuntu, add some access rules in udev, and add the user to a group. I'll document this this week On Jan 20, 2015 5:07 AM, "Stewart C. Russell" notifications@github.com wrote:

Any way to make infnoise run as a regular user without sudo? The less we need sudo, the better.

— Reply to this email directly or view it on GitHub https://github.com/waywardgeek/infnoise/issues/2.

maztaim commented 9 years ago

There are ways to do this. here is what I did.

Add a group called infnoise. Add the user which should have access to the infnoise group.

$ sudo groupadd infnoise
$ sudo usermod -a -G infnoise myid

Create a udev rule.

$ sudo vi /etc/udev/rules.d/70-infnoise.rules
SUBSYSTEMS=="usb", ATTRS{product}=="Infinite Noise TRNG", GROUP="infnoise"

Restart udevd. On Fedora, I think you can get away with this by running the following.

$ sudo systemctl restart systemd-udevd

I cheated and just rebooted.

waywardgeek commented 7 years ago

I think the udev rules work OK now. Please re-open if there are still issues.