LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How To Disable CTRL-ALT-F1 (https://www.linuxquestions.org/questions/linux-security-4/how-to-disable-ctrl-alt-f1-132806/)

beajedi 01-08-2004 03:09 PM

How To Disable CTRL-ALT-F1
 
I'm trying to strip down a machine so I can get it to be a internet-kiosk for a school.

I went into /etc/inittab and did this:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
# 2:2345:respawn:/sbin/mingetty tty2
# 3:2345:respawn:/sbin/mingetty tty3
# 4:2345:respawn:/sbin/mingetty tty4
# 5:2345:respawn:/sbin/mingetty tty5
# 6:2345:respawn:/sbin/mingetty tty6

This allowed me to disable the console switching by pressing ALT-F1 - ALT-F6

However, when I press "CTRL-ALT-F1" it takes me to another console with a login screen.

How do I disable the CTRL-ALT-F1 buttons?

Thanks in advance!

ac1980 01-08-2004 05:47 PM

What do you mean by "another"? tty1 should be the only one...
if you mean you run xdm/gdm and just want graphical login, you can disable tty1 the same way...
In case you get in trouble in future, to boot into single-user console mode use the 'single' kernel parameter in lilo/grub prompt

beajedi 01-08-2004 06:30 PM

I think I got it.

By commenting out the "1:2345:respawn:/sbin/mingetty tty1" part of my inittab, there is no other way to login besides using the graphical thing.

I still don't like the fact that you can still hit say, CTRL-ALT-F2, and have it switch to a blank screen. I know that someone will try it someday and won't know what to do.

ac1980 01-08-2004 06:53 PM

Let he/she admire the uncommensurable beauty of the smooth dark color on that screen... *he will probably panic and start pressing alt+ctrl+Fx until it will go back to screen 7, I suppose. Or *he will try to hack the system, but since *he's writing on a pipe to /dev/null, that would be difficult!

One interesting thing is tha if you have it installed (and that's quite easy), running "gdmflexiserver" from a shell box will open other graphic login shells (on screen 8-12) so many people can be logged at the same time. Enjoy it!

tosalstefedo 12-13-2004 12:48 PM

Disable CTRL+ALT+F(1-6)
 
We are currently using SuSE Linux SE 8, and running XF86 version 4.0.2. And we are not able to disable the CTRL+ALT+F(1-6) keys. We do not want to allow our users to be able to get to any other Desktop sessions. Is there a way to disable this? We already tried to comment out the entries in /etc/inittab, it does not give us a blank screen, we are still able to log in and it messes up the colors once we return using CTRL+ALT+F7.

Thanks in advance! :)

ac1980 12-20-2004 10:33 AM

To my knowledge, there is no other way to stop desktop switching keys than to hack and rebuild the XF86 source, which I doubt you want to do.
As for the console tty, I'm not sure where it may be started besides inittab; however you can find it out this way:
Code:

grep -n tty1 /etc/*

LinuxDave 12-23-2004 11:07 PM

Add the option "DontVTSwitch" to the serverflags section of the config file to disable switching with <ctrl>-<alt>-<f1-f12> from X windows.

Note that this may not work with the older XFree86 servers.


LinuxDave


All times are GMT -5. The time now is 07:11 AM.