Advertisement
sergio_educacionit

sudoers samba

Apr 12th, 2024
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.62 KB | None | 0 0
  1. Defaults    env_reset
  2. Defaults    mail_badpass
  3. # Se agrega ':/opt/bin' a la variable 'secure_path'
  4. Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
  5. Defaults    use_pty
  6.  
  7. # Alias de comandos administrativos de samba
  8. Cmnd_Alias SYSD_NMBD = /usr/bin/systemctl * nmbd*
  9.  
  10. Cmnd_Alias USRS_NMBD = /opt/bin/addsambauser *, \
  11. /usr/bin/smbpasswd -[ade] *
  12.  
  13. Cmnd_Alias CONF_NMBD = /usr/bin/nano /etc/samba/smb.conf
  14.  
  15.  
  16. root    ALL=(ALL:ALL) ALL
  17.  
  18. %sudo   ALL=(ALL:ALL) ALL
  19.  
  20. # grupo de usuarios administradores del servicio samba
  21.  
  22. %sambaadmin debian=(root:root) SYSD_NMBD, USRS_NMBD, CONF_NMBD
  23.  
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement