Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. permit nopass :wheel as root cmd /sbin/poweroff
  2. permit nopass :wheel as root cmd /sbin/reboot
  3.  
  4. permit :wheel
  5.  
  6. $ poweroff
  7.  
  8. $ doas poweroff
  9.  
  10. sudo visudo
  11.  
  12. %group_name ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown
  13.  
  14. user_name ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown
  15.  
  16. alias poweroff='sudo poweroff'
  17.  
  18. source ~/.bash_aliases
  19.  
  20. poweroff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement