Find the answer to your Linux question:
Results 1 to 4 of 4
Hello I have noticed that once you are at the loging prompt (normal user or root) If one presses CTRL+ALT+DEL the machine boots up again. It seems stupid as to ...
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    Banning normal user form doing shutdown at login prompt

    Hello
    I have noticed that once you are at the loging prompt (normal user or root) If one presses CTRL+ALT+DEL the machine boots up again. It seems stupid as to why would some one just logged in would reboot the machin ( unless dont know what's there on their mind). How to disable and force anyone to 1st login and after having sufficient permission perform the shutdwon.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    Ctrl + Alt + Del is Important shortcut,
    Some times its like fire exit, when you have to reboot system quickly at any stage safely, even while booting.

    The default command used is shutdown -r

    But you can edit the behaviour of Ctrl+Alt+Del in /etc/inittab file
    If you are on Ubuntu or its variants
    The /etc/inittab file is separeted in multiple files in /etc/event.d/ directory
    The file is /etc/event.d/control-alt-delete
    start on control-alt-delete

    exec /sbin/shutdown -r now "Control-Alt-Delete pressed"
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    There are a lot of ways to restrict Regular Users.
    You can disable Shutdown option at Login Screen, disable Power button and remove shutdown option from Menu for Regular Users.

    Check the contents of /etc/inittab file.

    Code:
    ca::ctrlaltdel:/sbin/shutdown -t3 -r now
    Disable it :
    Code:
    ca::ctrlaltdel:/bin/echo
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    Quote Originally Posted by b2bwild View Post
    If you are on Ubuntu or its variants
    Well I'm on ubuntu only for a short period of time as I have messed up my laptop. But are there lot of difference between variants of Linux.

    Quote Originally Posted by devils casper View Post
    Code:
    ca::ctrlaltdel:/sbin/shutdown -t3 -r now
    Disable it :
    Code:
    ca::ctrlaltdel:/bin/echo
    But doing the above code like what b2wild said won't provide user the authority to quickly shutdown that system when he has not reached the login prompt ( Ya its a kind of paradox statement to my own question but that time I didn't think of rebooting before starting i.e reaching prompt). But can this be done , Allowing a user to do a reboot before reaching the prompt but once on the login screen forced to enter and manually do shutdown ( Totally like a dreamy situation).
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...