Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Doas nopass not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Nov 05, 2023 6:21 pm    Post subject: [SOLVED] Doas nopass not working Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Nov 05, 2023 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
myga
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2023
Posts: 99

PostPosted: Sun Nov 05, 2023 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2968

PostPosted: Mon Nov 06, 2023 12:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum