Doas keeps asking me for password

5.7k Views Asked by At

I installed Doas as a replacement for sudo on my Gentoo machine. I followed the documentation here and my /etc/doas.conf looks like this:

permit persist :wheel

I have also restarted the system. However, it still asks me for the password every time I use doas. What am I doing wrong?

3

There are 3 best solutions below

4
mahendra rathod On

Make below changes in the doas configuration.

permit nopass ::wheel

or allow user and dont require a password to execute commands as root

permit nopass keepenv :username2

Reference URL

https://forums.freebsd.org/threads/doas-tips-sudo-alternative.69409/

3
DChaovII On

You have to enable persist while you are compiling. Set persist use flag and it will work. If you have (persist) while you are compiling, you have to unmask the app-admin/doas first.

1
jyand On

This works for me:

permit persist username as root