|
code logs -> 2025 -> Thu, 30 Jan 2025 | < code.20250129.log - code.20250131.log > |
--- Log opened Thu Jan 30 00:00:28 2025 |
01:12 | | Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has quit [Connection closed] |
02:18 | | Degi_ [Degi@Nightstar-5n3od1.pool.telefonica.de] has joined #code |
02:21 | | Degi [Degi@Nightstar-cjdq7k.pool.telefonica.de] has quit [Ping timeout: 121 seconds] |
02:21 | | Degi_ is now known as Degi |
07:21 | | himi [sjjf@Nightstar-o4k.pal.170.103.IP] has joined #code |
07:21 | | mode/#code [+o himi] by ChanServ |
08:13 | | Pinkhair [Pink@Nightstar-leprcf.sub-97-181-166.myvzw.com] has joined #code |
08:16 | | Pink [Pink@Nightstar-leprcf.sub-97-181-166.myvzw.com] has quit [Ping timeout: 121 seconds] |
08:52 | | PinkAFK [Pink@Nightstar-leprcf.sub-97-181-166.myvzw.com] has joined #code |
08:54 | | Pinkhair [Pink@Nightstar-leprcf.sub-97-181-166.myvzw.com] has quit [Ping timeout: 121 seconds] |
10:09 | < abudhabi> | Is there a way to allow a script sudo without having to type in the sudo password? |
10:10 | < abudhabi> | I have an annoyance in KVM in that sometimes the USB devices stop working, for which I've developed a script to reset USB. This works, but I have to use the integrated laptop keyboard and mouse to get that done, including typing in the sudo password. |
10:11 | < abudhabi> | I've turned it into a launcher button, but that still requires launching in terminal and input of the sudo password. |
10:12 | < abudhabi> | Less annoying than the gymnastics required to open up the terminal and find the script to run via the laptop hardware, but still. |
10:32 | <@TheWatcher> | abudhabi: one method is to do `chown root:root foobar.sh && chmod 4755 foobar.sh` |
10:34 | <@TheWatcher> | If you want to tie it down more, you can do `chown root:yourgroup foobar.sh && chmod 4750 foobar.sh` |
10:36 | <@TheWatcher> | That sets the setuid bit on the file, so when run it gets run as the file owner, no need for sudo. |
10:40 | < abudhabi> | The first method didn't work: https://pastebin.com/8Gc9xy58 |
10:41 | < abudhabi> | Not sure about the second, this user doesn't have its own generic group, but is member of a bunch of them. |
11:43 | <@TheWatcher> | Blegh. Well, alternative - in the sudoers file you can use `username ALL=(root) NOPASSWD: /usr/local/sbin/resetusb.sh` |
11:44 | <@TheWatcher> | Then username can do `sudo /usr/local/sbin/resetusb.sh` and should not be prompted for a pass |
12:01 | < abudhabi> | Hm. Are you sure the chown/chmod stuff actually worked for always running it as the owner? How can I verify that? |
13:07 | <@TheWatcher> | Oh, wait, it's a bash script - setuid won't work on those :/ |
13:08 | <@TheWatcher> | I'd forgotten about that. |
14:59 | | Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has joined #code |
14:59 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:12 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code |
15:12 | | mode/#code [+o Kindamoody] by ChanServ |
16:40 | | Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has quit [Ping timeout: 121 seconds] |
17:41 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
18:32 | | Emmy [Emmy@Nightstar-qo29c7.fixed.kpn.net] has joined #code |
19:30 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code |
19:30 | | mode/#code [+o Kindamoody] by ChanServ |
21:25 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
22:22 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has joined #code |
22:22 | | mode/#code [+o Kindamoody] by ChanServ |
23:03 | | Kindamoody [Kindamoody@Nightstar-qg5daj.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
23:33 | | Vornicus [Vorn@Nightstar-8k6f0b.res.spectrum.com] has joined #code |
23:33 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
--- Log closed Fri Jan 31 00:00:30 2025 |
|
code logs -> 2025 -> Thu, 30 Jan 2025 | < code.20250129.log - code.20250131.log > |
|