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
Moderatore: Staff
Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Domanda per Sudoers
# 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>
<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>
