LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2005, 06:30 PM   #1
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Rep: Reputation: 19
Can't reboot or halt without being root.


Slackware, Kernel 2.6.13, KDE 3.4

when I'm done or want to reboot I logout of KDE and if I'm logged in as "alex" and I can't type halt or reboot. it gives me "-bash: halt: command not found".

I have to be su just to halt.

not the end of the world but annoying as I am setting up my system still and am rebooting often.
 
Old 11-29-2005, 06:41 PM   #2
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Rep: Reputation: 15
If you know how to add a path to your environment variable, add /sbin to your path and you can type "halt" at the terminal.

Otherwise

Try using this command:
/sbin/halt

But I guess that a normal user account does not have the previledge to execute "halt", so you should use the LOGOUT botton in the KDE's main menu.
 
Old 11-29-2005, 06:58 PM   #3
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Original Poster
Rep: Reputation: 19
I think I was miss understood here. I do logout of KDE from the main menu and it get's me to the black screen where I had to type "startx" to load KDE. when I logout of KDE I am still logged in as Alex, my regular user.

I need to know how to get my normal account the privliges to be able to halt or reboot.
 
Old 11-29-2005, 07:05 PM   #4
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
Use sudo
(apt-get install sudo, and read the sudo manual)
 
Old 11-29-2005, 07:18 PM   #5
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Original Poster
Rep: Reputation: 19
Quote~Use sudo
(apt-get install sudo, and read the sudo manual)~Quote

now I'm really confused.
I understood absolutly nothing of that post.
 
Old 11-29-2005, 07:47 PM   #6
tskears
Member
 
Registered: Apr 2005
Location: Ottawa, Canada.
Distribution: PCLinuxOS.
Posts: 122

Rep: Reputation: 15
See... this is the trouble with us newbies. It isn't just we don't know the answers... we don't even know the questions! Then someone gives a reply like this and we walk away, shaking our heads, and re-boot into Windoze...

Apt is a package management tool that will handle installing software. It handles dependency issues where the package you're loading has other packages as prerequisites.
See http://www.debian.org/doc/manuals/ap.../index.en.html

sudo (superuser-do) is a terminal command that allows priviledged users to run commands as if they were root. In your case "sudo halt" or "sudo reboot", if you've added yourself to the sudo user group.
See www.courtesan.com/sudo/intro.html.

From another (perhaps not so) newbie...

Timothy.
 
Old 11-29-2005, 07:55 PM   #7
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Rep: Reputation: 15
Give me the results on your machine with this command:

echo $PATH
 
Old 11-29-2005, 07:59 PM   #8
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Original Poster
Rep: Reputation: 19
alex@Alex:~$ 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:.
 
Old 11-29-2005, 08:23 PM   #9
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Rep: Reputation: 15
In Fedora Core and RHEL there is a "halt" under /usr/bin directory which can be invoked directly with your "alex" user account, this is something much alike the one using "sudo" -- it uses "userhelper"(which is used to run a superuser command with normal account) -- I don't know whether slackware has this command. But I guess there must be a superuser's "halt" under /sbin.
I'm not familiar with KDE. Anyway, in Gnome's main menu, when invoke the Log Out button, you get some options like "Log out", "Reboot", "Shutdown", choose "Reboot" will take you directly rebooting your machine and not the text terminal which you typed "startx". I have experimented this with my machine.
If KDE has not the Log Out menu button, then you have to do with the "sudo" way (because it is probably that you don't have userhelper installed, and sudo is much more popuplar -- I guess).
 
Old 12-02-2005, 03:29 PM   #10
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
somebody once mentioned a file called shutdown.allow that you can put somwhere to use halt (which is rewaly a symlink for shutdown -h now)
or any otehr shutdown command such as -r
if anyone knwo this i am looking to doi this too!
 
Old 12-03-2005, 08:25 PM   #11
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
Found it!

this thread (started by me a while back) gives details
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 04:28 PM
Can only reboot or halt as root Kernel 2.6.5 Slackware 2 05-20-2004 09:07 AM
Weird reboot-halt problem pavlidisd Linux - General 2 03-18-2004 04:54 AM
halt and reboot in gnome tuggy Debian 1 08-28-2003 11:25 PM
halt, shutdown, and reboot HappyDude Linux - Software 29 07-24-2003 03:05 PM


All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration