From 61668d76580ea83d99b9340487d8ede22d7fff1d Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Sat, 21 Jan 2023 18:53:00 +0530 Subject: [PATCH] doas.conf: allow pratham to use hdparm and dmesg without password --- scripts/chroot-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/chroot-setup.sh b/scripts/chroot-setup.sh index 463497b..1df8971 100644 --- a/scripts/chroot-setup.sh +++ b/scripts/chroot-setup.sh @@ -80,7 +80,11 @@ usermod --password $(echo pratham | openssl passwd -1 -stdin) pratham usermod --password $(echo root | openssl passwd -1 -stdin) root # setup doas for pratham -echo "permit persist keepenv pratham" | tee -a /etc/doas.conf +cat < /etc/doas.conf +permit persist keepenv pratham +permit nopass keepenv pratham cmd hdparm +permit nopass keepenv pratham cmd dmesg +EOF # setup root user's cron jobs echo "${ROOT_CRONTAB}" | crontab -