<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As long as lirc is not switching users when it runs things, then there<br>
should be no need to use sudoers! Arrgh! I would still want to test<br>
it by getting lirc to run a script that runs whoami though. It is<br>
possible for a program to run things as a different user with lesser<br>
permissions. That is a fairly common trick for daemons that are run<br>
as root.<br>
<br>
Lircd is run from systemd. To find its status:<br>
<br>
sudo systemctl status lircd<br>
<br>
? lircd.service - Flexible IR remote input/output application support<br>
Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor<br>
preset: enabled)<br>
Active: active (running) since Wed 2020-02-19 05:09:37 NZDT; 2<br>
weeks 2 days ago<br>
Docs: man:lircd(8)<br>
<a href="http://lirc.org/html/configure.html" rel="noreferrer" target="_blank">http://lirc.org/html/configure.html</a><br>
Main PID: 2345 (lircd)<br>
Tasks: 2 (limit: 4915)<br>
CGroup: /system.slice/lircd.service<br>
+-2345 /usr/sbin/lircd --nodaemon<br>
<br>
Mar 02 06:45:04 mypvr lircd[2345]: lircd-0.10.0[2345]: Notice:<br>
accepted new client on /var/run/lirc/lircd<br>
Mar 02 06:45:04 mypvr lircd[2345]: lircd-0.10.0[2345]: Info:<br>
initializing '/dev/input/event12'<br>
Mar 02 06:45:04 mypvr lircd[2345]: lircd-0.10.0[2345]: Info: Using<br>
device: /dev/input/event12<br>
Mar 02 06:45:04 mypvr lircd-0.10.0[2345]: Notice: accepted new client<br>
on /var/run/lirc/lircd<br>
Mar 02 06:45:04 mypvr lircd-0.10.0[2345]: Info: initializing<br>
'/dev/input/event12'<br>
Mar 02 06:45:04 mypvr lircd-0.10.0[2345]: Info: Using device:<br>
/dev/input/event12<br>
Mar 02 06:46:04 mypvr lircd[2345]: lircd-0.10.0[2345]: Notice:<br>
accepted new client on /var/run/lirc/lircd<br>
Mar 02 06:46:04 mypvr lircd-0.10.0[2345]: Notice: accepted new client<br>
on /var/run/lirc/lircd<br>
Mar 02 06:46:30 mypvr lircd[2345]: lircd-0.10.0[2345]: Info: removed<br>
client<br>
Mar 02 06:46:30 mypvr lircd-0.10.0[2345]: Info: removed client<br>
<br>
and to see its control files:<br>
<br>
sudo systemctl cat lircd<br>
<br>
# /lib/systemd/system/lircd.service<br>
[Unit]<br>
Documentation=man:lircd(8)<br>
Documentation=<a href="http://lirc.org/html/configure.html" rel="noreferrer" target="_blank">http://lirc.org/html/configure.html</a><br>
Description=Flexible IR remote input/output application support<br>
Wants=lircd-setup.service<br>
After=network.target lircd-setup.service<br>
<br>
[Service]<br>
Type=simple<br>
ExecStart=/usr/sbin/lircd --nodaemon<br>
; User=lirc<br>
; Group=lirc<br>
<br>
; Hardening opts, see systemd.exec(5). Doesn't add much unless<br>
; not running as root.<br>
;<br>
; # Required for dropping privileges in --effective-user.<br>
; CapabilityBoundingSet=CAP_SETEUID<br>
; MemoryDenyWriteExecute=true<br>
; NoNewPrivileges=true<br>
; PrivateTmp=true<br>
; ProtectHome=true<br>
; ProtectSystem=full<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
As you can see above, the User= and Group= lines are commented out, so<br>
it runs as root. I think it used to run as lirc in the past, but it<br>
looks like it now runs as root since the update to the new version of<br>
lirc.<br>
_______________________________________________<br><br></blockquote><div><br></div><div>Mama, the moderator ate my reply. Here it is again with a bit of trimming.</div><div><br></div><div class="gmail_quote"><div>Another example of my system being old school. As I said, I run lircd from rc.local so things are different.</div><div>This doesn't mean it is right, but it is how HDHomerun did it when I built my Mythbuntu-8 system and that is what I just kept doing when I did the rebuild last year.</div><div><br></div><div><b> dad@NewMyth:~$ sudo systemctl status lircd</b></div><b>● lircd.service<br> Loaded: not-found (Reason: No such file or directory)<br> Active: inactive (dead)</b></div><div class="gmail_quote"><br></div><div class="gmail_quote">I have some experimenting to do but it looks like it is likely that this will be easier than what we had been discussing.</div><font color="#888888"><div class="gmail_quote"><br></div></font><div><span style="color:rgb(136,136,136)">Allen</span> </div></div></div>