Doas
Page content
doas, an alternative to sudo
Everybody knows sudo … right ? the bsd guys just hacked an alternative tool calleed doas …
simple, secure and clever
example follow later, here a good and quick tutorial.
Introduction to doas on OpenBSD
Quick and Dirty, Full Permission for group wheel
su -
if [ -f /etc/doas.conf ]; then
echo "permit nopass keepenv :wheel" >> /etc/doas.conf
else
echo "permit nopass keepenv :wheel" > /etc/doas.conf
fi
chmod 600 /etc/doas.conf
Allow User Joe to Switch to another User
cat << 'EOF' >> /etc/doas.conf
# give user joe right to switch to user webmaster -> "/usr/bin/su - webmaster"
permit nopass joe cmd /usr/bin/su args - webmaster
EOF
sha256: bfce3e35786e8739c192d14a286c3ccb13dc76e5010796b7a04f1ca5ec617c46