Reboot: must be superuser
I have tried and tried but never been able to get slackware to reboot and halt for non-root users. how the heck am I supposed to do it? this is what I have tried so far:
Code:
akudewan@ranjan404:~$ which reboot |
try sudo. You'll need to edit the config file using the command visudo
|
visudo /etc/sudoers (really, any text editor should work)
yourusername yourhostname = NOPASSWD: /sbin/reboot, /sbin/halt -h now, /sbin/halt This user can now shutdown via sudo without a password. To enable shutdown/reboot from within gnome (ala the way DL GNOME sets it up): mkdir /var/run/console touch /var/run/console/yourusername chmod +s /sbin/reboot chmod +s /sbin/halt |
just type visudo as it says in the sudoers man page.........
Quote:
|
Or if you are not very security conscious (like me as I am on a single user home machine behind a firewall) you can chmod +s /sbin/halt
|
You can also use CTL-ALT-DEL to reboot or shutdown. The default is to reboot but this this is what I use to shutdown. Just change it in inittab
ca::ctrlaltdel:/sbin/shutdown -t5 -h now |
have try by giving
chmod a+x /sbin/halt chmod a+x /sbin/reboot |
Quote:
|
mkdir /var/run/console touch /var/run/console/yourusername chmod +s /sbin/reboot chmod +s /sbin/halt This worked for me :) Care to explain how this works ? |
All times are GMT -5. The time now is 12:39 AM. |