Re: doas

2024-09-05 Thread jrmu
I wrote a guide: https://wiki.ircnow.org/?n=Doas.Configure -- jrmu IRCNow (https://ircnow.org) On Thu, Sep 05, 2024 at 01:59:49PM -0400, openbsd_fr...@mail2tor.com wrote: > Gentlemen! How do I doas my regular user. > > How do I learn the syntax? > > Thanks. >

Re: doas

2024-09-05 Thread Carl Trachte
man page online link: https://man.openbsd.org/doas On Thu, Sep 5, 2024 at 12:29 PM Rob Schmersel wrote: > > On Thu, 5 Sep 2024 13:59:49 -0400 > openbsd_fr...@mail2tor.com wrote: > > > Gentlemen! How do I doas my regular user. > > > > How do I learn the syntax? &g

Re: doas

2024-09-05 Thread Andreas Kähäri
On Thu, Sep 05, 2024 at 08:09:55PM +0200, Peter N. M. Hansteen wrote: > On Thu, Sep 05, 2024 at 01:59:49PM -0400, openbsd_fr...@mail2tor.com wrote: > > Gentlemen! How do I doas my regular user. > > Please do not assume all contributors here are male. > > doas needs a val

Re: doas

2024-09-05 Thread Rob Schmersel
On Thu, 5 Sep 2024 13:59:49 -0400 openbsd_fr...@mail2tor.com wrote: > Gentlemen! How do I doas my regular user. > > How do I learn the syntax? > > Thanks. > read the man page?

Re: doas

2024-09-05 Thread Peter N. M. Hansteen
On Thu, Sep 05, 2024 at 01:59:49PM -0400, openbsd_fr...@mail2tor.com wrote: > Gentlemen! How do I doas my regular user. Please do not assume all contributors here are male. doas needs a valid doas.conf. See man doas and man doas.conf. -- Peter N. M. Hansteen, member of the first RFC 1

doas

2024-09-05 Thread openbsd_freak
Gentlemen! How do I doas my regular user. How do I learn the syntax? Thanks.

Re: doas tab completion

2024-07-30 Thread Страхиња Радић
l \) -maxdepth 1 -exec basename {} ';' ) In any case, this fills up memory in the shell by creating fairly large arrays. Alternative: type a command using normal Tab completion but without the doas "prefix", Ctrl-A, type "doas ", press Enter. [1]: https://unix.stackexchange.com/questions/128985/why-not-parse-ls-and-what-to-do-instead

Re: doas tab completion

2024-07-30 Thread Kirill A . Korinsky
On Mon, 29 Jul 2024 17:32:06 +0200, Florian Obser wrote: > > in .kshrc: > > set -A complete_doas_1 -- $(ls /sbin /usr/sbin /bin /usr/bin /usr/X11R6/bin \ > /usr/local/sbin /usr/local/bin) > I think this way is cleaner, isn't it? set -A complete_doas_1 -- $(echo $PATH | tr ':' '\n' | xargs

Re: doas tab completion

2024-07-30 Thread Kirill A . Korinsky
On Mon, 29 Jul 2024 17:32:06 +0200, Florian Obser wrote: > > again, in .kshrc: > > HOST_LIST=`awk '{print $1}' < ~/.ssh/known_hosts | cut -f 1 -d, \ > | egrep -v '^[[:digit:]]|^$|\:\:' | sort -u` > > set -A complete_ssh -- ${HOST_LIST} > set -A complete_ping -- ${HOST_LIST} > set -A complet

Re: doas tab completion

2024-07-30 Thread Alexander Hall
On July 30, 2024 8:03:45 AM GMT+02:00, Jason McIntyre wrote: >On Tue, Jul 30, 2024 at 12:42:04AM +0200, Alexander Hall wrote: >> In this specific case, I believe >> >> $ alias doas='doas ' # Note the space >> >> might have done the trick as well, f

Re: doas tab completion

2024-07-29 Thread Jason McIntyre
On Tue, Jul 30, 2024 at 12:42:04AM +0200, Alexander Hall wrote: > In this specific case, I believe > > $ alias doas='doas ' # Note the space > > might have done the trick as well, for ksh at least. > > /Alexander > is that correct? as far as i know, adding

Re: doas tab completion

2024-07-29 Thread Alexander Hall
In this specific case, I believe $ alias doas='doas ' # Note the space might have done the trick as well, for ksh at least. /Alexander On July 29, 2024 7:30:57 PM GMT+02:00, Robert Palm wrote: >Thanks a lot for sharing all this great solutions! > >Am 29. Juli 2024, 17:3

Re: doas tab completion

2024-07-29 Thread Robert Palm
Thanks a lot for sharing all this great solutions! Am 29. Juli 2024, 17:37, um 17:37, Stuart Henderson schrieb: >On 2024-07-29, Robert Palm wrote: >> >> Hi, >> >> wonder how I can get TAB completion in the shell when using doas ... >> >> Do I need to

Re: doas tab completion

2024-07-29 Thread Stuart Henderson
On 2024-07-29, Robert Palm wrote: > > Hi, > > wonder how I can get TAB completion in the shell when using doas ... > > Do I need to add something to .profile ? pkg_add dmenu, then you can add this: set -A complete_doas `dmenu_path` (note it will not update automatically i

Re: doas tab completion

2024-07-29 Thread Florian Obser
On 2024-07-29 12:05 +02, Jan Stary wrote: > On Jul 29 11:44:32, develo...@robert-palm.de wrote: >> complete -cf doas >> >> but I cannot figure out how to do this for ksh. >> in .kshrc: set -A complete_doas_1 -- $(ls /sbin /usr/sbin /bin /usr/bin /usr/X11R6/bin \

Re: doas tab completion

2024-07-29 Thread Robert Palm
Quoting Marcus MERIGHI : Hello Robert, develo...@robert-palm.de (Robert Palm), 2024.07.29 (Mon) 09:47 (CEST): wonder how I can get TAB completion in the shell when using doas ... Do I need to add something to .profile ? as I understand your other messages in this thread you are looking

Re: doas tab completion

2024-07-29 Thread Marcus MERIGHI
Hello Robert, develo...@robert-palm.de (Robert Palm), 2024.07.29 (Mon) 09:47 (CEST): > wonder how I can get TAB completion in the shell when using doas ... > Do I need to add something to .profile ? as I understand your other messages in this thread you are looking for a solution for

Re: doas tab completion

2024-07-29 Thread Kirill A . Korinsky
On Mon, 29 Jul 2024 09:47:39 +0200, Robert Palm wrote: > > wonder how I can get TAB completion in the shell when using doas ... > > Do I need to add something to .profile ? > Depends on the shell you are using. Assuming you are using BASH, you will probably get what you want

Re: doas tab completion

2024-07-29 Thread Robert Palm
Zitat von Jan Stary : On Jul 29 11:44:32, develo...@robert-palm.de wrote: > On Jul 29 09:47:39, develo...@robert-palm.de wrote: > > wonder how I can get TAB completion in the shell when using doas ... echo $SHELL Different shells do (or don't) this differently. > tab

Re: doas tab completion

2024-07-29 Thread Jan Stary
On Jul 29 11:44:32, develo...@robert-palm.de wrote: > > On Jul 29 09:47:39, develo...@robert-palm.de wrote: > > > wonder how I can get TAB completion in the shell when using doas ... echo $SHELL Different shells do (or don't) this differently. > > tab completion is n

Re: doas tab completion

2024-07-29 Thread Robert Palm
Zitat von Jan Stary : On Jul 29 09:47:39, develo...@robert-palm.de wrote: wonder how I can get TAB completion in the shell when using doas ... tab completion is not specific to any command. Hm, it does work, e.g. when I start typing $sysu it shows me the commands starting with "

Re: doas tab completion

2024-07-29 Thread Jan Stary
On Jul 29 09:47:39, develo...@robert-palm.de wrote: > wonder how I can get TAB completion in the shell when using doas ... tab completion is not specific to any command.

doas tab completion

2024-07-29 Thread Robert Palm
Hi, wonder how I can get TAB completion in the shell when using doas ... Do I need to add something to .profile ? Thank you.

Re: doas and args matching

2022-07-29 Thread Alexander Hall
On July 28, 2022 9:06:51 PM GMT+02:00, Chris Narkiewicz wrote: >On Thu, Jul 28, 2022 at 03:08:19PM +0200, Alexander Hall wrote: >> Just leaving out the "args ..." from the config should accomplish that. > >It would allow the user to set any wscons parameters, which is not optimal. > >But eith

Re: doas and args matching

2022-07-29 Thread Alexis
Maksim Rodin writes: $ /sbin/wsconsctl display.brightness=50 wsconsctl: /dev/ttyC0: Permission denied Did you forget to type "doas" before your command? Gah, apparently so. :-/ i try to be thorough when i check these things, but then i do something like this. Thank you. Ch

Re: doas and args matching

2022-07-29 Thread Maksim Rodin
> $ /sbin/wsconsctl display.brightness=50 wsconsctl: /dev/ttyC0: Permission > denied > Did you forget to type "doas" before your command? On Пт 29 июл 2022 15:38:37, Alexis wrote: > > Alexander Hall writes: > > > > There's a good chance i'm mi

Re: doas and args matching

2022-07-28 Thread Alexis
Alexander Hall writes: There's a good chance i'm misunderstanding, but doesn't this run into the same issue? Namely, that (as far as i'm aware) it's not possible to specify that a doas-permitted command be allowed to run with arbitrary arguments (or range of arg

Re: doas and args matching

2022-07-28 Thread Alexander Hall
be; untested) >> >> wsconsctl "display.brightness${1%%[!+-]*}=${1#[+-]}" >> >> for moar fanziness. > >There's a good chance i'm misunderstanding, but doesn't this run into the same >issue? Namely, that (as far as i'm aware) it's

Re: doas and args matching

2022-07-27 Thread Alexis
ance i'm misunderstanding, but doesn't this run into the same issue? Namely, that (as far as i'm aware) it's not possible to specify that a doas-permitted command be allowed to run with arbitrary arguments (or range of arguments), rather than only the arguments specified in doas.conf? Alexis.

Re: doas and args matching

2022-07-27 Thread Alexander Hall
nd >> the only solution i found so far is to explicitly put all values in >> doas.conf. > >Since no-one has yet offered any better suggestions: perhaps you could write a >wrapper script that can be called without arguments, and instead takes the >brightness value from stdin

Re: doas and args matching

2022-07-26 Thread Alexis
offered any better suggestions: perhaps you could write a wrapper script that can be called without arguments, and instead takes the brightness value from stdin? E.g. something like: $ echo 50 | doas /usr/local/bin/my-wrapper where my-wrapper is something like: #!/bin/ksh IFS=

Re: doas hang suddenly

2022-06-22 Thread Siegfried Levin
ithout an issue. It is running OpenBSD >> 7.1. However, today I suddenly cannot use doas anymore. It always hang. Has >> anyone met this issue before? > > How does the doas process look in top(1) when it's hanging? > > -- > Please keep replies on the mailing list. >

Re: doas hang suddenly

2022-06-22 Thread Stuart Henderson
On 2022-06-22, Siegfried Levin wrote: > My server has been running for weeks without an issue. It is running OpenBSD > 7.1. However, today I suddenly cannot use doas anymore. It always hang. Has > anyone met this issue before? How does the doas process look in top(1) when it&

doas hang suddenly

2022-06-21 Thread Siegfried Levin
My server has been running for weeks without an issue. It is running OpenBSD 7.1. However, today I suddenly cannot use doas anymore. It always hang. Has anyone met this issue before? Siegfried siegfried.le...@gmail.com

Re: Doas

2021-02-19 Thread harold felton
;/etc/examples". It > also helps that many (all?) programs written for the OpenBSD project are > able to check the syntax of their own configuration files while printing > any errors to standard output, including doas. #!/bin/sh # # hjf latest mod: 2020-04-04 @ 09:30 PDT # ##

Re: Doas

2021-02-19 Thread Jean-Pierre de Villiers
You'll find plenty of examples in the directory "/etc/examples". It also helps that many (all?) programs written for the OpenBSD project are able to check the syntax of their own configuration files while printing any errors to standard output, including doas. Regards, Jean-Pierre de Villiers

Re: Doas

2021-02-19 Thread Peter N. M. Hansteen
On Fri, Feb 19, 2021 at 03:53:38PM +0530, Sivan ! wrote: > Didn't realize that it was a reply to you. Man pages are thorough and > good for > those who grew up in the unix/linux environment, but I am sorry, I > have trouble deciphering the instructions for syntax. There aren't > enough > examples

Doas

2021-02-19 Thread Sivan !
xamples in man pages that illustrate the use of the commands for someone with copy and paste level of system admin skills. I sent another message a moment ago, that must also have been sent to you as a "reply" instead of as a "replyall" to the list. Copying that message below:

Re: unable to restart nsd with doas

2021-02-10 Thread Leo Unglaub
I am soo sorry for the noise. doas works as expected, my tar command just exited silently with an error and rcctl never run as it should. So sorry for the noise, for the history archives, doas works as expected! Am 10.02.2021 um 19:25 schrieb Leo Unglaub: Hey, i have a problem restarting nsd

unable to restart nsd with doas

2021-02-10 Thread Leo Unglaub
Hey, i have a problem restarting nsd from a script that is run as doas. I have read the man page of doas several times, but i dont understand what i am doing wrong. Maybe someone of you could help me out. That would be so nice. My problem is": I have a script called "worker&quo

Re: doas changes?

2021-01-21 Thread Simon Parrer
Cool, thanks for reply. Next time i will check AnonCVS before. Best Regards Simon On Thu, Jan 21, 2021 at 08:41:45PM +0100, Martijn van Duren wrote: > On Thu, 2021-01-21 at 19:56 +0100, Simon Parrer wrote: > > Hello together, > > maybe any one can say me if there are changes on

Re: doas changes?

2021-01-21 Thread Martijn van Duren
On Thu, 2021-01-21 at 19:56 +0100, Simon Parrer wrote: > Hello together, > maybe any one can say me if there are changes on doas? > I ask because my doas say Abort trap when i try to use it with sysupgrade or > pkg_add -u. > I do sysupgrade to OpenBSD 6.8-current (GENERIC.MP) #285

doas changes?

2021-01-21 Thread Simon Parrer
Hello together, maybe any one can say me if there are changes on doas? I ask because my doas say Abort trap when i try to use it with sysupgrade or pkg_add -u. I do sysupgrade to OpenBSD 6.8-current (GENERIC.MP) #285: Wed Jan 20 17:31:16 MST 2021. Many Thanks and best regards Simon

Re: weird ansible + doas behaviour

2020-06-21 Thread Gregory Edigarov
On 2020-06-21 23:55, Stuart Henderson wrote: On 2020-06-21, Gregory Edigarov wrote: Trying to run ansible-playbook with localhost. Playbook: --- - hosts: localhost   become: true   become_method: doas   roles:   - wrkstpkgs Expected behaviour - Ansible asks for the become pass

Re: weird ansible + doas behaviour

2020-06-21 Thread Theo de Raadt
Stuart Henderson wrote: > On 2020-06-21, Gregory Edigarov wrote: > > Yes, it's definitely  the case. But are there any workarounds? of course > > I can install sudo from packages, but I'm always willing to stick with > > the base as much as possible.  And completely preventing the  promptin

Re: weird ansible + doas behaviour

2020-06-21 Thread Stuart Henderson
On 2020-06-21, Gregory Edigarov wrote: > Yes, it's definitely  the case. But are there any workarounds? of course > I can install sudo from packages, but I'm always willing to stick with > the base as much as possible.  And completely preventing the  prompting > for password using permit nopass

weird ansible + doas behaviour

2020-06-21 Thread Gregory Edigarov
Trying to run ansible-playbook with localhost. Playbook: --- - hosts: localhost   become: true   become_method: doas   roles:   - wrkstpkgs Expected behaviour - Ansible asks for the become pass only once, then execution of tasks require no intervention. Observed behaviour: run ansible

Re: weird ansible + doas behaviour

2020-06-21 Thread Stuart Henderson
On 2020-06-21, Gregory Edigarov wrote: > Trying to run ansible-playbook with localhost. > Playbook: > > --- > - hosts: localhost >   become: true >   become_method: doas > >   roles: >   - wrkstpkgs > > > Expected behaviour - Ansible asks for the beco

Re: Attempting to configure syslogd for logging doas

2020-02-26 Thread ben
Hello, Raf; After creating the doas log file I was able to syslog was able to write messages to the file. I read the man page for newsyslog and have configured it for the doas log. Thank you for you help. Ben Raskin.

Re: Attempting to configure syslogd for logging doas

2020-02-26 Thread Raf Czlonka
On Wed, Feb 26, 2020 at 08:59:40PM GMT, b...@0x1bi.net wrote: > I'm attempting to configure syslogd via syslog.conf. I've added two > lines which log all doas events: > > default configuration here... > > !doas > *.* /var/log/doas > >

Attempting to configure syslogd for logging doas

2020-02-26 Thread ben
I'm attempting to configure syslogd via syslog.conf. I've added two lines which log all doas events: default configuration here... !doas *.* /var/log/doas However, after restarting syslogd and attempting to running commands through doas, /var/log/doas is

Re: mounting ext3 using doas

2020-02-09 Thread Ted Unangst
dmthomp...@gmx.com wrote: > So I tried doas with this "permit nopass me as root cmd mount_ext2fs" > but still no luck. > > So I was hoping for a hand from you kind souls. > > Oh and when I try to mount at command line using doas I get 'syntax error at > l

mounting ext3 using doas

2020-02-08 Thread dmthompson
ownership to user (myself), have created an /etc/fstab entry that goes something like "/dev/sd1i /mnt/Toshiba_2tb ext2fs noauto,user 0 0", but the bugger still wont mount for the ordinary user. So I tried doas with this "permit nopass me as root cmd mount_ext2fs" but still no luck. S

Re: doas(1) adjustable timeout length

2019-12-24 Thread Ingo Schwarze
s less disruptive. So, i'm not convinced we want the patch quoted below. Yours, Ingo > diff --git usr.bin/doas/doas.conf.5 usr.bin/doas/doas.conf.5 > index b5cacde22cd..b541aef966c 100644 > --- usr.bin/doas/doas.conf.5 > +++ usr.bin/doas/doas.conf.5 > @@ -47,7 +47,7 @@ Opti

Re: doas(1) adjustable timeout length

2019-12-19 Thread Hiltjo Posthuma
t from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html > Hi Andrej, Sometimes there is a reason implementation details are not specificly documented, but I don't know if thats the case here. Patch: diff --git usr.bin/doas/doas.conf.5 usr.bin/doas/doas.conf.5 index b5c

Re: doas(1) adjustable timeout length

2019-12-19 Thread andrej
Hi Ted, On the note of accurate documentation; how about adding the actually defined timeout for persist rather than the "some time"? Cheers, Andrej -- Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html

an alias switch in doas

2019-07-04 Thread Joseph A Borg
may I humbly suggest the addition of an alias switch in the doas command. It would serve to shorten the command into something shorter and perhaps more memorable. I don’t think there are security implications as such but I’m no expert on security. I think it’s neater to have this functoinality

Re: Bypass doas password check with chroot

2019-07-02 Thread Brian Brombacher
Use doas.conf to permit root with nopass option. See doas.conf(5). > On Jul 2, 2019, at 4:43 AM, cho...@jtan.com wrote: > > This isn't a bug per se, more of an incongruity in how security-centric tools > work wrt root, specifically doas and chroot/su/other: > > joe@

Bypass doas password check with chroot

2019-07-02 Thread chohag
This isn't a bug per se, more of an incongruity in how security-centric tools work wrt root, specifically doas and chroot/su/other: joe@drogo$ doas -s drogo# doas -u chohag -s doas (root@drogo) password: doas: Authorization failed drogo# chroot -u chohag / drogo$ ^D drogo#

Re: User who invoke doas

2019-05-02 Thread Nick Holland
On 5/2/19 8:04 AM, Ted Unangst wrote: > Nick Holland wrote: >> > In a shell script invoked by doas, is it possible to find which user >> > invoke the script? my search a the moment has come up empty. >> >> most likely place would be an environment variable, right

Re: User who invoke doas

2019-05-02 Thread Frank Shute
On Thu, May 02, 2019 at 04:29:20AM +, Adam Steen wrote: > > Hi > > In a shell script invoked by doas, is it possible to find which user > invoke the script? my search a the moment has come up empty. > > Cheers Adam > Hi Adam, Nowadays, I think the POSIX way is con

Re: User who invoke doas

2019-05-02 Thread Ted Unangst
Nick Holland wrote: > > In a shell script invoked by doas, is it possible to find which user > > invoke the script? my search a the moment has come up empty. > > most likely place would be an environment variable, right? > > # echo "I started out as $LOGNAME

Re: User who invoke doas

2019-05-02 Thread Adam Steen
On Thu, May 2, 2019 at 20:17, Nick Holland wrote: > On 5/1/19 10:28 PM, Adam Steen wrote: >> Hi >> >> In a shell script invoked by doas, is it possible to find which user >> invoke the script? my search a the moment has come up empty. > > most likely place would

Re: User who invoke doas

2019-05-02 Thread Nick Holland
On 5/1/19 10:28 PM, Adam Steen wrote: > Hi > > In a shell script invoked by doas, is it possible to find which user > invoke the script? my search a the moment has come up empty. most likely place would be an environment variable, right? So ... $ whoami nick

Re: User who invoke doas

2019-05-01 Thread Andreas Kusalananda Kähäri
On Thu, May 02, 2019 at 04:29:20AM +, Adam Steen wrote: > Hi > > In a shell script invoked by doas, is it possible to find which user invoke > the script? my search a the moment has come up empty. > > Cheers > Adam > Investigate the owner of the shell's pa

Re: User who invoke doas

2019-05-01 Thread Benny
If there is only one user running the script, can ps -A | grep "script_name" work? ‐‐‐ Original Message ‐‐‐ On Wednesday, May 1, 2019 9:29 PM, Adam Steen wrote: > Hi > > In a shell script invoked by doas, is it possible to find which user invoke > the script?

User who invoke doas

2019-05-01 Thread Adam Steen
Hi In a shell script invoked by doas, is it possible to find which user invoke the script? my search a the moment has come up empty. Cheers Adam

Re: doas called multiple times hangs

2019-01-21 Thread Hiltjo Posthuma
06:03 Ted Unangst napisał(a): > > > Ted Unangst wrote: > > > Dariusz Sendkowski wrote: > > > > Yes, it does. > > > > > > > > I extracted 'unveilcommands' function from doas.c and put it into a > > > > standalone progra

Re: doas called multiple times hangs

2019-01-21 Thread Dariusz Sendkowski
s' function from doas.c and put it into a > > > standalone program to run it. > > > It turned out the result was the same as in doas command. When I > disable > > > unveil, then it works fine. > > > > This diff should fix the problem. > > Actually, miscalculatio

Re: doas called multiple times hangs

2019-01-20 Thread Ted Unangst
Ted Unangst wrote: > Dariusz Sendkowski wrote: > > Yes, it does. > > > > I extracted 'unveilcommands' function from doas.c and put it into a > > standalone program to run it. > > It turned out the result was the same as in doas command. When I disabl

Re: doas called multiple times hangs

2019-01-20 Thread Ted Unangst
Dariusz Sendkowski wrote: > Yes, it does. > > I extracted 'unveilcommands' function from doas.c and put it into a > standalone program to run it. > It turned out the result was the same as in doas command. When I disable > unveil, then it works fine. This diff sho

Re: doas called multiple times hangs

2019-01-20 Thread Dariusz Sendkowski
Yes, it does. I extracted 'unveilcommands' function from doas.c and put it into a standalone program to run it. It turned out the result was the same as in doas command. When I disable unveil, then it works fine. niedz., 20 sty 2019 o 22:31 Ted Unangst napisał(a): > Dariu

Re: doas called multiple times hangs

2019-01-20 Thread Ted Unangst
s it work? Index: doas.c === RCS file: /cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.74 diff -u -p -r1.74 doas.c --- doas.c 17 Jan 2019 05:35:35 - 1.74 +++ doas.c 20 Jan 2019 21:30:55 - @@ -409,8 +409,6 @@

Re: doas called multiple times hangs

2019-01-20 Thread Dariusz Sendkowski
s.conf: > permit nopass myuser as root > > > > > On Sun, 20 Jan 2019 at 11:50, Hiltjo Posthuma > wrote: > >> On Sun, Jan 20, 2019 at 11:15:38AM +0100, Dariusz Sendkowski wrote: >> > Hi, >> > >> > Calling 'doas' in a loop makes the

Re: doas called multiple times hangs

2019-01-20 Thread Dariusz Sendkowski
This is -stable 6.4. doas.conf: permit nopass myuser as root On Sun, 20 Jan 2019 at 11:50, Hiltjo Posthuma wrote: > On Sun, Jan 20, 2019 at 11:15:38AM +0100, Dariusz Sendkowski wrote: > > Hi, > > > > Calling 'doas' in a loop makes the machine hang. >

Re: doas called multiple times hangs

2019-01-20 Thread Hiltjo Posthuma
On Sun, Jan 20, 2019 at 11:15:38AM +0100, Dariusz Sendkowski wrote: > Hi, > > Calling 'doas' in a loop makes the machine hang. > I guess this is not an expected behavior. > It can be checked by executing the following simple bash script: > > for i in {0..2}

doas called multiple times hangs

2019-01-20 Thread Dariusz Sendkowski
Hi, Calling 'doas' in a loop makes the machine hang. I guess this is not an expected behavior. It can be checked by executing the following simple bash script: for i in {0..20000} do doas ls some_dir done I have run it on three different machines and the result is the same on ea

Re: migrate python script from sudo to doas

2018-11-03 Thread Markus Rosjat
see 2 possible cause : - your python script, - or maybe the userid for which your python script runs is not the one defined in doas.conf. i switch back to spawnl function and it worked with doas so I will stick with that since it's working. Maybe later I will revisit the problem and give it an

Re: migrate python script from sudo to doas

2018-11-02 Thread vincent delft
serid for which your python script runs is not the one defined in doas.conf. regards The python script I use is: " import subprocess cmd = "doas useradd -u 9003 -g=uid -s /sbin/nologin -d /tmp test3" cmd_list = cmd.split() exit = subprocess.check_call(cmd_list) " the tests

Re: migrate python script from sudo to doas

2018-10-31 Thread Markus Rosjat
Hi Vincent Am 30.10.2018 um 16:03 schrieb Vincent Legoll: Maybe you should try like the following: cmd = ['doas', 'useradd', '-u', user_id, '-g', '=uid', '-s', '/sbin/nologin', '-d', mb_parent_dir,

Re: migrate python script from sudo to doas

2018-10-30 Thread Vincent Legoll
Hello, On Tue, Oct 30, 2018 at 12:33 PM Markus Rosjat wrote: > exit = subprocess.check_call(['doas', 'useradd', '-u %s' % user_id, > '-g =uid', > '-s /sbin/nologin', > '-d %s' % mb_parent_dir, > user_name]) Maybe yo

Re: migrate python script from sudo to doas

2018-10-30 Thread Markus Rosjat
installed  but these days we have doas and its totally enough for things I use to do so I said to myself "lets update these old scripts ..." . In code this was basically replasing os.spawnl with subprocess.check_call  but when I run this the useradd command doesnt get executed by the scri

Re: migrate python script from sudo to doas

2018-10-30 Thread Solene Rapenne
Markus Rosjat wrote: > hi all, > > I have some old python scripts that using os.spawnl to execute stuff > like useradd  combined with sudo. This worked just fine on systems with > sudo installed  but these days we have doas and its totally enough for > things I use to do s

migrate python script from sudo to doas

2018-10-30 Thread Markus Rosjat
hi all, I have some old python scripts that using os.spawnl to execute stuff like useradd  combined with sudo. This worked just fine on systems with sudo installed  but these days we have doas and its totally enough for things I use to do so I said to myself "lets update these old sc

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-30 Thread Markus Rosjat
change was made doas worked as expected with the script regards -- Markus Rosjatfon: +49 351 8107224mail: ros...@ghweb.de G+H Webservice GbR Gorzolla, Herrmann Königsbrücker Str. 70, 01099 Dresden http://www.ghweb.de fon: +49 351 8107220 fax: +49 351 8107227 Bitte prüfen Sie, ob diese Mai

Re: doas behaviour in recent snapshot [was Re: 6.4 doas gives "command not found" if no #!/bin/sh up top]

2018-10-29 Thread jungle Boogie
Known bug. Use full path until it's fixed.

doas behaviour in recent snapshot [was Re: 6.4 doas gives "command not found" if no #!/bin/sh up top]

2018-10-29 Thread tomr
On 10/30/18 10:11 AM, Ted Unangst wrote: > tomr wrote: >> I'm a bit confused here. I have some cwm keybindings that `doas rcctl` >> things, which now aren't working as they used to - which isn't >> necessarily a problem - but I'm surprised at the b

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-29 Thread Theo de Raadt
gt;>> Adding a "#!/bin/sh" at the top of the scripts made them all work again. > >>> > >>> i don't believe this is a change; that's how it should always work. > >> > >> sorry, this appears wrong. doas actually uses execvpe() from libc

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-29 Thread Ted Unangst
tomr wrote: > I'm a bit confused here. I have some cwm keybindings that `doas rcctl` > things, which now aren't working as they used to - which isn't > necessarily a problem - but I'm surprised at the behaviour below: > > # this doesn't work anymore.. &

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-29 Thread tomr
On 10/22/18 9:48 AM, Ted Unangst wrote: > Ted Unangst wrote: >> Ted Unangst wrote: >>> Derek wrote: >>>> Adding a "#!/bin/sh" at the top of the scripts made them all work again. >>> >>> i don't believe this is a change; that

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-21 Thread Ted Unangst
Ted Unangst wrote: > Ted Unangst wrote: > > Derek wrote: > > > Adding a "#!/bin/sh" at the top of the scripts made them all work again. > > > > i don't believe this is a change; that's how it should always work. > > sorry, this appears

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-21 Thread Ted Unangst
Ted Unangst wrote: > Derek wrote: > > Just upgraded from 6.3 to 6.4 and the doas behaviour seems to have changed. > > > > I finally solved it, but just posting here in case anyone has this problem. > > > > I had a few little shell scripts in /usr/local/sbin/

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-21 Thread Ted Unangst
Derek wrote: > Just upgraded from 6.3 to 6.4 and the doas behaviour seems to have changed. > > I finally solved it, but just posting here in case anyone has this problem. > > I had a few little shell scripts in /usr/local/sbin/ - intended to be run > by doas : one-liners like

Re: 6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-21 Thread tfrohw...@fastmail.com
>Adding a "#!/bin/sh" at the top of the scripts made them all work >again. Sounds like now the behavior is as it should be. If you really need the old behavior back you could try running the scripts with the dot command.

6.4 doas gives "command not found" if no #!/bin/sh up top

2018-10-20 Thread Derek
Just upgraded from 6.3 to 6.4 and the doas behaviour seems to have changed. I finally solved it, but just posting here in case anyone has this problem. I had a few little shell scripts in /usr/local/sbin/ - intended to be run by doas : one-liners like bioctl mounting a USB stick or whatever

Re: doas id -ru returns 0 ?

2018-04-23 Thread Rudolf Sykora
On 23 April 2018 at 17:19, Philip Guenther wrote: > On Mon, Apr 23, 2018 at 4:53 PM, Rudolf Sykora > wrote: >> >> I expected that >> >> doas id -ru >> >> would return my uid. >> >> But it returns 0 (ie root) >> >> Can anybody comm

Re: doas id -ru returns 0 ?

2018-04-23 Thread Philip Guenther
On Mon, Apr 23, 2018 at 4:53 PM, Rudolf Sykora wrote: > I expected that > > doas id -ru > > would return my uid. > > But it returns 0 (ie root) > > Can anybody comment on it? > Hmm, what led you to expect it to return your UID? doas, like su, sets both the effect

doas id -ru returns 0 ?

2018-04-23 Thread Rudolf Sykora
Hello, I expected that doas id -ru would return my uid. But it returns 0 (ie root) Can anybody comment on it? Thanks Ruda

Re: net-snmpd extend and doas : a tty is required

2018-04-13 Thread Martijn van Duren
On 04/12/18 23:13, Joel Carnat wrote: >> Le 12 avr. 2018 à 21:10, Stuart Henderson a écrit : >> >> On 2018-04-12, Joel Carnat mailto:j...@carnat.net>> wrote: >>> Hi, >>> >>> I want net-snmpd to run a script via the extend directive. >>>

Re: net-snmpd extend and doas : a tty is required

2018-04-12 Thread Joel Carnat
> Le 12 avr. 2018 à 21:10, Stuart Henderson a écrit : > > On 2018-04-12, Joel Carnat mailto:j...@carnat.net>> wrote: >> Hi, >> >> I want net-snmpd to run a script via the extend directive. >> This script has to run a command using doas to get temporary ro

  1   2   >