Ho installato Slackware 12.1.
Come indicato nella guida S4D per spegnere Slackware da utente non root ho modificato con "visudo" il file "/etc/sudoers" decommentando le ultime due righe:
Codice: Seleziona tutto
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
%users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
%users localhost=/sbin/shutdown -h now
Se ci provo ottengo come risposta:
marco@Slackware:~$ mount /dev/cdrom
mount: solamente root può montare /dev/hdc su /mnt/cdrom
marco@Slackware:~$ shutdown -r now
bash: shutdown: command not found
Il comando "groups" dato da utente mi restituisce:marco@Slackware:~$ /sbin/shutdown
shutdown: you must be root to do that!
Grazie a tutti per le rispostemarco@Slackware:~$ groups
audio video cdrom plugdev users

