View previous topic :: View next topic |
Author |
Message |
myga Tux's lil' helper
Joined: 12 Jun 2023 Posts: 121
|
Posted: Sun Nov 05, 2023 6:21 pm Post subject: [SOLVED] Doas nopass not working |
|
|
Hello,
If this post is in the wrong section, please move it. I posted here because it seemed appropriate since this is a security issue.
I'm trying to run a command without 'doas' asking for a password. Here are different combinations that I tried (all of the below configurations do not work with '/bin/ls' either).
Code: | $ cat /etc/doas.conf
permit nopass myga as root cmd ls |
Code: | $ cat /etc/doas.conf
permit nopass keepenv myga as root cmd ls |
Code: | $ cat /etc/doas.conf
permit nopass :username cmd ls |
Code: | $ cat /etc/doas.conf
permit nopass keepenv :username cmd ls |
Code: | $ cat /etc/doas.conf
permit nopass :wheel cmd ls |
Code: | $ cat /etc/doas.conf
permit nopass keepenv :wheel cmd ls |
Solution: not sure exactly what was the issue, but it seemed to work after putting the line below in 'doas.conf':
Code: | permit nopass myga cmd ls args /root |
Thank you @alamahant.
Last edited by myga on Mon Nov 06, 2023 12:21 am; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3950
|
Posted: Sun Nov 05, 2023 10:05 pm Post subject: |
|
|
Yes either use
Code: |
permit nopass myga as root
|
or
Code: |
permit nopass myga cmd ls
|
It doesnt like the combination of the two. _________________
|
|
Back to top |
|
|
myga Tux's lil' helper
Joined: 12 Jun 2023 Posts: 121
|
Posted: Sun Nov 05, 2023 11:56 pm Post subject: |
|
|
alamahant wrote: | Yes either use
Code: |
permit nopass myga as root
|
or
Code: |
permit nopass myga cmd ls
|
It doesnt like the combination of the two. |
Not working either. |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 3038
|
Posted: Mon Nov 06, 2023 12:18 am Post subject: |
|
|
myga wrote: | alamahant wrote: | Yes either use
Code: |
permit nopass myga as root
|
or
Code: |
permit nopass myga cmd ls
|
It doesnt like the combination of the two. |
Not working either. |
What about "permit nopass myga"? Is your doas.conf permission set correctly? |
|
Back to top |
|
|
|