1
0
Fork 0

doas.conf: allow pratham to use hdparm and dmesg without password

This commit is contained in:
Pratham Patel 2023-01-21 18:53:00 +05:30
parent 584d11f7c5
commit 61668d7658
1 changed files with 5 additions and 1 deletions

View File

@ -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 <<EOF > /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 -