DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th May 2020
epitaxial epitaxial is offline
Port Guard
 
Join Date: Feb 2015
Posts: 21
Default Problem with doas and unbound-adblock

I'm trying to get the unbound-adblock script from https://geoghegan.ca/unbound-adblock.html working but the doas command is giving me problems.

I'm following the instructions and here is my /etc/doas.conf
Code:
permit nopass _adblock cmd rcctl args reload unbound
Running the command
Code:
epitaxial ~ $ doas -u _adblock sh /usr/local/bin/unbound-adblock.sh
doas: Operation not permitted
The script exists in that location and is marked executable. Running it as root gives the same results. This is under OpenBSD 6.7, What gives?
Reply With Quote
  #2   (View Single Post)  
Old 29th May 2020
victorvas victorvas is offline
Real Name: Victor
Linux
 
Join Date: May 2019
Posts: 148
Default

Put an empty new line at the end of doas.conf
Reply With Quote
  #3   (View Single Post)  
Old 29th May 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 306
Default

Do you have the doas permissions to run the script as _adblock?
Reply With Quote
  #4   (View Single Post)  
Old 29th May 2020
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 408
Default

Code:
doas: Operation not permitted
Operation not permitted means it's a username-related issue.

I think TronDD asked the right question.
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #5   (View Single Post)  
Old 29th May 2020
epitaxial epitaxial is offline
Port Guard
 
Join Date: Feb 2015
Posts: 21
Default

Quote:
Originally Posted by TronDD View Post
Do you have the doas permissions to run the script as _adblock?
Isn't that set by doas.conf? I'm confused
Reply With Quote
  #6   (View Single Post)  
Old 29th May 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 306
Default

If that is your entire doas.conf file, you never gave anyone permission to run the script as user _adblock.

Is that your entire doas.conf file? If not, what is the whole thing?
Reply With Quote
  #7   (View Single Post)  
Old 30th May 2020
epitaxial epitaxial is offline
Port Guard
 
Join Date: Feb 2015
Posts: 21
Default

Quote:
Originally Posted by TronDD View Post
If that is your entire doas.conf file, you never gave anyone permission to run the script as user _adblock.

Is that your entire doas.conf file? If not, what is the whole thing?
Now that makes more sense. Here is my whole doas.conf

Code:
permit nopass epitaxial as _adblock
permit nopass _adblock cmd rcctl args reload unbound
Thanks.
Reply With Quote
  #8   (View Single Post)  
Old 30th May 2020
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 306
Default

So user epitaxial can run the command in your first post.

doas -u _adblock sh /usr/local/bin/unbound-adblock.sh

Run it again as epitaxial. What is the output? What is in /var/log/secure?
Reply With Quote
  #9   (View Single Post)  
Old 30th May 2020
epitaxial epitaxial is offline
Port Guard
 
Join Date: Feb 2015
Posts: 21
Default

Adding that first line to my doas.conf fixed the problem.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adblock Plus investigation victorvas News 19 21st February 2020 05:44 PM
Adblock Plus issue in Firefox victorvas OpenBSD Packages and Ports 10 11th May 2019 08:31 PM
Publisher Sues AdBlock Plus For Copyright Infringement e1-531g News 0 11th April 2019 11:02 AM
DOAS(1) rules jjstorm OpenBSD General 8 11th April 2016 08:09 PM
doas package Peter_APIIT OpenBSD General 2 1st November 2015 07:45 AM


All times are GMT. The time now is 03:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick