Pagina 1 di 1

Domanda per Sudoers

Inviato: lun 8 nov 2004, 1:00
da Harp
Leggendo varie discussioni e Slacware for dummies ho avuto delle difficoltà ad editare il file /etc/sudoers.
<BR>Chiedo un parere su come ho fatto e vi posto il mio file.
<BR>(vorrei usare i comandi reboot e halt anche da utente)
<BR>
<BR>
<BR>#
<BR># This file MUST be edited with the ´visudo´ command as root.
<BR>#
<BR># See the sudoers man page for the details on how to write a sudoers file.
<BR>#
<BR>
<BR># Host alias specification
<BR>
<BR># User alias specification
<BR>
<BR># Cmnd alias specification
<BR>
<BR>Cmnd_Alias SHUT = /sbin/reboot, /sbin/halt
<BR>
<BR># Defaults specification
<BR>
<BR># User privilege specification
<BR>root ALL=(ALL) ALL
<BR>
<BR># Uncomment to allow people in group wheel to run all commands
<BR># %wheel ALL=(ALL) ALL
<BR>
<BR># Same thing without a password
<BR># %users ALL=(ALL) NOPASSWD: ALL
<BR>
<BR># Samples
<BR># %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
<BR># %users localhost=/sbin/halt
<BR>
<BR>%users ALL = NOPASSWD: SHUT
<BR>
<BR>
<BR>Ho creato una file .bash_profile con i seguenti comandi:
<BR>
<BR>alias halt=´sudo /sbin/halt´
<BR>alias reboot=´sudo /sbin/reboot´
<BR>
<BR>E´ una soluzione valida?
<BR>Grazie per l´aiuto.
<BR>Harp00.
<BR>
<BR><br>

Domanda per Sudoers

Inviato: lun 8 nov 2004, 1:12
da meritil
# sudoers file.
<BR>#
<BR># This file MUST be edited with the ´visudo´ command as root.
<BR>#
<BR># See the sudoers man page for the details on how to write a sudoers file.
<BR>#
<BR>
<BR># Host alias specification
<BR>
<BR># User alias specification
<BR>User_Alias NOME_ALIAS = [SCRIVI QUI GLI UTENTI CHE VUOI POSSANO USARE I COMANDI SEPARATI DA UNA VIRGOLA]
<BR># Cmnd alias specification
<BR>Cmnd_Alias NOME_COMANDI = /sbin/reboot, /sbin/shutdown
<BR># Defaults specification
<BR>
<BR># User privilege specification
<BR>root ALL=(ALL) ALL
<BR>
<BR># Uncomment to allow people in group wheel to run all commands
<BR># %wheel ALL=(ALL) ALL
<BR>
<BR># Same thing without a password
<BR># %wheel ALL=(ALL) NOPASSWD: ALL
<BR>
<BR># Samples
<BR># %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
<BR># %users localhost=/sbin/shutdown -h now
<BR>NOME_ALIAS ALL = NOPASSWD: NOME_COMANDI
<BR>
<BR>
<BR>
<BR>
<BR>GLI ALIAS VANNO BENE TRANNE CHE NEI FILE .BASRC E .BASH_PROFILE DEVI METTERE I DOPPI APICI ANZICHÈ GLI APICI SINGOLI.
<BR><br>