LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-24-2012, 08:18 AM   #1
geelsu
LQ Newbie
 
Registered: Apr 2004
Location: Maryland, USA
Distribution: RHEL 5,6
Posts: 21

Rep: Reputation: 0
Control-Alt-Delete modifications


Greetings all,

I've modified my /etc/init/control-alt-delete.conf file so that the control-alt-delete key sequence now does this:

exec /bin/echo "Naughty you. Sorry, can't do that." > /dev/console

However, at the console prompt the above phrase just sits there next to the login: prompt. I know it is a small thing but the login: prompt never clears, and only reverts to normal once I hit a return key.

Any ideas on getting the login: prompt to clear and return to normal automatically?

---------- Post added 05-24-12 at 01:18 PM ----------

Oh. This is for RHEL 6.
 
Old 05-24-2012, 09:06 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
How about using STDOUT instead of /dev/console? It sounds like your bypassing part of the input-output mechanism.

Also, how is this a security question?
 
Old 05-24-2012, 09:37 AM   #3
geelsu
LQ Newbie
 
Registered: Apr 2004
Location: Maryland, USA
Distribution: RHEL 5,6
Posts: 21

Original Poster
Rep: Reputation: 0
The only thing I can get to echo to all the tty consoles is a redirection to /dev/console ... well so far, but I'll keep looking. Maybe there is something I can do with getty.

Part of the hardening steps we implement as recommended by the Navy's security scanner(SECSCN)is to disable the control-alt-delete feature so a server cannot be shutdown in this method. Also the government agency I work with requires this key sequence to be disabled. IMHO it is a very serious security issue and closes the door on one potential method of accidental or intentional tampering with a server. What do you think?
 
Old 05-24-2012, 10:22 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,350

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
As somebody who works in an environment dominated by Windows machines that automatically timeout to a blank screen lockout requiring Ctrl-Alt-Delete to regain access, I have more than once accidentally reset Linux servers through unthinking use of this key stroke sequence. This is an annoyance and inconvenience while the server reboots.
The security benefits are debatable. Anybody with the ability to type Ctrl-Alt-Delete on the local keyboard has physical access to the server, a far more serious security concern.
A user doing this remotely would be disruptive, but how did such a user get access to the system before this and what benefit would be gained by an attacker triggering a reboot?
 
Old 05-24-2012, 10:49 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@geelsu: Why the (fancy) message when pressing that key combo?

Simplest way: Comment out all the lines in /etc/init/control-alt-delete.conf and ctrl-alt-del isn't recognized/acted upon.
 
1 members found this post helpful.
Old 05-24-2012, 10:52 AM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Your question struck me more as a programming question than a security question. How about disabling it in /etc/inittab. Look for the line like the following:
Code:
ca::ctrlaltdel:/sbin/shutdown -t5 -r now
You could then modify the line with something like this:
Code:
ca:12345:ctrlaltdel:/bin/echo "Naughty you. Sorry, can't do that."
Reference here, but there are several: http://www.ducea.com/2006/06/20/how-...-linux-system/
 
Old 05-24-2012, 11:01 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@Noway2: RHEL 6 doesn't do the ctrl-alt-del stuff in the inittab any more, /etc/init/control-alt-delete.conf is used (the new upstart vs the "old" System V init).
 
Old 05-24-2012, 11:58 AM   #8
geelsu
LQ Newbie
 
Registered: Apr 2004
Location: Maryland, USA
Distribution: RHEL 5,6
Posts: 21

Original Poster
Rep: Reputation: 0
druuna: true. Your suggestion is what I have about concluded. Simply let it be disabled. Perhaps I was aiming towards a little fun with other sys admins on the team.

allend: agreed. physical access is a primary line of defense. But I too have been bitten by the accidental reboot using control-alt-delete because my mind was in windows mode. With racks of servers all attached to KVM devices and the routine switching back and forth between one server to another sooner or later ...

Thank you all for your input.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
control-alt-del and control f2? Romanus81 Slackware 1 03-11-2008 04:41 PM
BillGates and control-alt-delete kalleanka General 6 03-27-2006 10:50 AM
Control-Alt-Delete to bring up logoff prompt ocgltd Linux - Software 5 09-16-2005 09:01 PM
Control Alt Delete Restarts Computer, how to fix? PeaceTank Linux - Software 1 02-22-2005 01:00 AM
Ctrl Alt Delete What? Brother Michael Linux - Newbie 2 12-09-2003 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:24 AM.

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
Open Source Consulting | Domain Registration