[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: URGENT - How to shutdown Debian 3? - URGENT



16.11.2002 00:14:34, Levi Waldron <levi.waldron@utoronto.ca> wrote:

>On November 15, 2002 03:31 pm, Llies Meridja wrote:
>
>> No it does not work, first when I choose GNOME session and do
>> ctrl+alt+del nothing happens, then when I log to KDE session and do
>> ctrl+alt+del I get system guard!
>
>Did you try Nate's advice?  Log in, open a terminal (xterm, for example), 
>then do as he says:
>
>> once logged in do 'su' and input the root password when prompted,
>> then issue the 'halt' command to halt the system.
>>
>
>
>If you don't like logging in as root whenever you shut down, you could give 
>your userid permission to do some commands as root:
>
>1) Type "su" in a terminal to log in as root
>2) visudo
>3) move to the bottom of the file, and type "i" to enter insert mode
>4) type the line (Replace username with your username):
>
>username    ALL = NOPASSWD: /usr/sbin/poweroff
>
>5)  <ESC> :wq        to exit
>6) Now your regular user can type /sbin/halt to poweroff.  Additionally, you 
>could put the following line in your user's /home/username/.bashrc file:
>
>alias halt="/sbin/halt"  

shouldn't that read
alias halt="sudo /sbin/halt"  
or even better
alias halt="/usr/bin/sudo /sbin/halt"  

>
>OR, 
>
>alias anynicknameIwant="/sbin/halt"
>
>(with the editor of your choice, or using vi filename and the same "insert" 
>and save & quit commands as visudo)
>
>7)  From then on, your regular user can shut down just by typing "halt" into 
>a shell.  You could even make an icon or menu item to do it.
>
>You might want to add other commands in visudo, like /usr/bin/xcdroast (for 
>writing CDs).
>
>Hope this helps,
>Levi

- Michael




Reply to: