You are not logged in.

#1 2012-06-06 22:28:58

mfaridi
Member
Registered: 2010-12-15
Posts: 192

I can not shutdown or reset system from commnad line but by KDE can

I use arch linux with KDE , tonight I  want reset or shutdown my system by coammand line when I type this command

shutdown -h

I see this message

shutdown: you must be root to do that!

and I can not do this , but with shutdown option in KDE , I can do this

Offline

#2 2012-06-06 22:32:10

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: I can not shutdown or reset system from commnad line but by KDE can

have you tried

sudo shutdown -h

the error message is explicit enough.

If you mean you want your user account to be able to do this, then have you added yourself in the sudoers file with the NOPASSWD option for the poweroff and reboot commands?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2012-06-06 22:34:47

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: I can not shutdown or reset system from commnad line but by KDE can

Inxsible wrote:

have you tried

sudo shutdown -h

the error message is explicit enough.

If you mean you want your user account to be able to do this, then have you added yourself in the sudoers file with the NOPASSWD option for the poweroff and reboot commands?

I do that but after type command it need password and I type it but nothing happen

Offline

#4 2012-06-06 22:41:24

sup
Member
From: Earth
Registered: 2010-09-11
Posts: 21

Re: I can not shutdown or reset system from commnad line but by KDE can

Try:

 sudo init 0 

This should also shut down your system.


Use:

 sudo init 6 

To restart.

Last edited by sup (2012-06-06 22:43:11)

Offline

#5 2012-06-06 22:49:45

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: I can not shutdown or reset system from commnad line but by KDE can

sup wrote:

Try:

 sudo init 0 

This should also shut down your system.

thanks

this command work for me shutdown system

but what I must do if I want put this command in crontab ?
I want my system shutdown at 8 oclock in morning . and this is happen every day

Last edited by mfaridi (2012-06-06 22:50:10)

Offline

#6 2012-06-06 22:55:01

sup
Member
From: Earth
Registered: 2010-09-11
Posts: 21

Re: I can not shutdown or reset system from commnad line but by KDE can

Offline

#7 2012-06-06 23:18:42

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: I can not shutdown or reset system from commnad line but by KDE can

You're asking for two different things.  First, "shutdown -h" just halts the system; it doesn't power it off.  Second, if you want to use cron, then read up on how to use cron.  Oh, and KDE doesn't use the "shutdown" command to shut down; it uses DBUS and Consolekit.  You can place the appropriate consolekit command into a crontab to shut down without a password at the same time daily.

Off-hand: Have you tried Kshutdown?

Offline

Board footer

Powered by FluxBB