Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo and auth.log #7

Open
Ciao121 opened this issue Dec 27, 2022 · 1 comment
Open

sudo and auth.log #7

Ciao121 opened this issue Dec 27, 2022 · 1 comment

Comments

@Ciao121
Copy link

Ciao121 commented Dec 27, 2022

Using this module like leds.power.turnOff() or any other command in a node script running as root I get those lines in auth.log file:

sudo:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/tee /sys/class/leds/led0/brightness
Dec 27 09:14:52 myhost sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Dec 27 09:14:52 myhostsudo: pam_unix(sudo:session): session closed for user root

I'm using turnOff and turnOff thousand of times and the logfile become enourmous. How to workaround this?
Thanks!!!!

@Ciao121
Copy link
Author

Ciao121 commented Dec 29, 2022

A good solution IMHO is to test (at first run) if a led command can be executed without using sudo and using it only if the test is unsuccesfull. I'm not good enough to code it well so it's a suggestion if someoune would do it...
As a workaroud I forked the repository and changed it to not using sudo at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant