Is halt supposed to be a command that can only be executed by root, or did something fuck up with Slack?
/sbin/halt
shutdown -h now
Dear god, I hope you would have to be root to shutdown the computer.
Ok, is there any way I can make it so I don't have to keep switching to root to shut down? :-\ it's annoying.
Quote from: deadly7 on February 04, 2006, 11:05:48 PM
Ok, is there any way I can make it so I don't have to keep switching to root to shut down? :-\ it's annoying.
sudo /sbin/shutdown -h now
Quote from: deadly7 on February 04, 2006, 11:05:48 PM
Ok, is there any way I can make it so I don't have to keep switching to root to shut down? :-\ it's annoying.
You're supposed to switch to root? Crap, I've been using the power button!
But seriously, yeah, what Newby said.
You could change your sudoers file to allow yourself to sudo /sbin/halt
Newby: for shutdown, you don't need /sbin/
I'm confused! Thanks, Quik.
Quote from: Quik on February 05, 2006, 12:02:37 AM
You could change your sudoers file to allow yourself to sudo /sbin/halt
Newby: for shutdown, you don't need /sbin/
If he's using Slackware, /sbin/ isn't in $PATH for a normal user (unless you modify it to be there).
:0
I truely doubt he'd know how to put /sbin/ in the $PATH, so perhaps you should tell him. I'm also interested, so eh?
You can try chmod'ing it to run as root. I've never tried that myself:
chmod +s /sbin/halt
Of course, why would you want to let an ordinary user turn off your computer, in general? It seems silly to allow that by default. I'm not sure how you could POSSIBLY consider that a "fuck up".
Quote from: iago on February 05, 2006, 01:04:24 PM
You can try chmod'ing it to run as root. I've never tried that myself:
chmod +s /sbin/halt
Of course, why would you want to let an ordinary user turn off your computer, in general? It seems silly to allow that by default. I'm not sure how you could POSSIBLY consider that a "fuck up".
Windows has corrupted me. I also assumed that all of you peoples that have been using Slackware knew of some magical trick/command to get around it for the lazy.
Quote from: Joe on February 05, 2006, 01:01:14 PM
I truely doubt he'd know how to put /sbin/ in the $PATH, so perhaps you should tell him. I'm also interested, so eh?
Quotenewby@impaler:~$ shutdown
-bash: shutdown: command not found
newby@impaler:~$ echo $PATH
/home/jklinect/clamav/bin:/home/jklinect/mono-1.1.13.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
newby@impaler:~$ PATH=/sbin:$PATH
newby@impaler:~$ echo $PATH
/sbin:/home/jklinect/clamav/bin:/home/jklinect/mono-1.1.13.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
newby@impaler:~$ shutdown --help
shutdown: you must be root to do that!
newby@impaler:~$ echo "^^"
^^
newby@impaler:~$
Modify ~/.bash_profile to add it in there if you want it there for each login.
Quote from: Newby on February 05, 2006, 01:30:10 PM
Modify ~/.bash_profile to add it in there if you want it there for each login.
How would modifying .bash_profile in one home directory affect the path for each login? Perhaps you're implying that each login has to do that? If that's the case, sorry.
Quote from: Sidoh on February 05, 2006, 02:09:16 PM
Quote from: Newby on February 05, 2006, 01:30:10 PM
Modify ~/.bash_profile to add it in there if you want it there for each login.
How would modifying .bash_profile in one home directory affect the path for each login? Perhaps you're implying that each login has to do that? If that's the case, sorry.
It will after each time that user logins in. Not for every user.
Quote from: Ergot on February 05, 2006, 02:10:56 PM
It will after each time that user logins in. Not for every user.
Ah. He was using login as a verb, not a noun. Misunderstood; sorry.
Quote from: Newby on February 05, 2006, 10:45:07 AM
Quote from: Quik on February 05, 2006, 12:02:37 AM
You could change your sudoers file to allow yourself to sudo /sbin/halt
Newby: for shutdown, you don't need /sbin/
If he's using Slackware, /sbin/ isn't in $PATH for a normal user (unless you modify it to be there).
:0
What slack versions have you been using?
Quik what version of Slackware have YOU been using?
ergot@deepthought:~$ locate shutdown | grep sbin
/sbin/shutdown
ergot@deepthought:~$ /sbin/shutdown
shutdown: you must be root to do that!
Quote from: Quik on February 05, 2006, 03:36:26 PM
Quote from: Newby on February 05, 2006, 10:45:07 AM
Quote from: Quik on February 05, 2006, 12:02:37 AM
You could change your sudoers file to allow yourself to sudo /sbin/halt
Newby: for shutdown, you don't need /sbin/
If he's using Slackware, /sbin/ isn't in $PATH for a normal user (unless you modify it to be there).
:0
What slack versions have you been using?
Slackware 10.0, Slackware 10.1, and Slackware 10.2...
Quote from: Ergot on February 05, 2006, 03:42:50 PM
Quik what version of Slackware have YOU been using?
ergot@deepthought:~$ locate shutdown | grep sbin
/sbin/shutdown
ergot@deepthought:~$ /sbin/shutdown
shutdown: you must be root to do that!
Yeah, but try a "sudo shutdown -h now" ;)
Quotenewby@impaler:~$ sudo shutdown --help
Password:
sudo: shutdown: command not found
newby@impaler:~$ echo "Quik is a raging homo."
Quik is a raging homo.
I don't believe any Slackware versions have /sbin or /usr/sbin on the PATH, but on that same note, who cares? Where shutdown is located has nothing to do with the question in this topic. Perhaps somebody should find all the posts that are related to where shutdown is located and move them somewhere. Right now, this thread is very confusing.
sidoh@deepthought:~$ sudo shutdown --help
Password:
sudo: shutdown: command not found
sidoh@deepthought:~$ sudo /sbin/shutdown --help
/sbin/shutdown: invalid option -- -
Usage: shutdown [-akrhfnc] [-t secs] time [warning message]
-a: use /etc/shutdown.allow
-k: don't really shutdown, only warn.
-r: reboot after shutdown.
-h: halt after shutdown.
-f: do a 'fast' reboot (skip fsck).
-F: Force fsck on reboot.
-n: do not go through "init" but go down real fast.
-c: cancel a running shutdown.
-t secs: delay between warning and kill signal.
** the "time" argument is mandatory! (try "now") **
sidoh@deepthought:~$ sudo echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
sidoh@deepthought:~$
FYI: if you use /sbin/poweroff it'll shutdown the power for you automatically (shutdown doesn't, unless you throw the -p switch on the FBSD version).
Thought I'd mention poweroff is part of the sysvinit package (http://freshmeat.net/projects/sysvinit/), if you're interested in downloading it. Slackware comes with it installed by default.
It doesn't?! Mine does on both my desktop and laptop but not my server :(.
Quote from: mynameistmp on February 07, 2006, 03:28:41 AM
FYI: if you use /sbin/poweroff it'll shutdown the power for you automatically (shutdown doesn't, unless you throw the -p switch on the FBSD version).
Thought I'd mention poweroff is part of the sysvinit package (http://freshmeat.net/projects/sysvinit/), if you're interested in downloading it. Slackware comes with it installed by default.
That's good to know. Thanks. :)