Project

General

Profile

postprocessor script, problem with interactive authentication

Added by Thomas Rehberg almost 7 years ago

Summary:
Why authentication for specific commands is still needed on postprocessing script although user hts is not longer required for interactive authentication ?

Details:
For some reason I want to "mask sleep.target" and some other tasks that normally would ask for interactive authentication.
I have managed to adapt sudoers and polkit configuration so that no authentication is needed at commandline, and also no popups of org.freedesktop.x.x are asking for passwords. Perfectly working when running as user "hts" from the terminal, BUT:
When I run these commands in a script triggered by the pre/post-processor command of tvheadend (as per the Webgui) the script is failing because of "interactive autentification needed" anyway !!
The script is definitely started under user hts, I have checked that by simply using whoami.
=> So why then it is still asking for authentication ?
Also, it is not clear to me why the log is always starting with "spawn" when the script is starting, something I must miss fundamentaly here ?

Any help or suggestion I would highly appreciate, as I have all scripts ready to go, this problem really came unexpected...


Replies (3)

RE: postprocessor script, problem with interactive authentication - Added by Thomas Rehberg almost 7 years ago

still struggling.
I have no idea why, in case anything starts with "sudo ..." in the script in the logfile I see a "spawn: Executing "/usr/bin/sudoreplay".
This is not what I want, and also not what you find nowhere in the script. Some applies if I don't start a script but have a simple command in the preprocessing field starting with a sudo.
Why on earth it wants start sudoreplay remains a miracle to me :-(

RE: postprocessor script, problem with interactive authentication - Added by Thomas Rehberg almost 7 years ago

thanks for asking, Mark.
I yesterday solved the issue: Changing the Shebang to sh (have had it on bash before) and also introducing an "export PATH=/home/tvh/bin:/usr/local/bin:/usr/bin:/bin:/sbin" to the script did the job.
Now I have a "spawn: Created symlink from /etc/systemd/system/suspend.target to /dev/null." logging in tvheadend, which is exactly what I wanted as a preprocessing command.
I will further scrutinize what was the compeling event, but first get the postprocessing script running, which is more complex.
Soon I have the project done I will share all scripts and configs to the forum.

    (1-3/3)