You are not logged in.
Pages: 1
Dear all,
I have been asked to secure the current project application against being killed or tampered with.
Of course, I can put a daemon to keep an eye on the system and, in case anybody kills the app, immediately restart it.
However, if there were no text console to use for wandering the system during the application execution, nobody would be able to "play" with it beforehand.
Is there any way for me to keep the consoles from appearing when pressing ctrl-alt-fx?
Anywhere to look for help?
EDIT: Of course, the application runs in ctrl-alt-f7 and I want to prevent anybody from using ctrl-alt-f1 to f6 to log into the system
Thanks a lot, guys.
Antonio
Offline
# sed -i 's/^tty/#&/' /etc/inittab
# kill -1 1
Offline
did you try this?
http://ubuntuforums.org/showthread.php?t=776098
chek /etc/X11/xorg.conf.d/* files
Offline
Edit /etc/inittab as root and comment out:
[c]# /sbin/getty respawn shell invocations for selected ttys.
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6[/c]
Although disabling the virtual terminals might come back to bite you in the ass when you have to kill a non-responsive program that's stalling X with it.
Offline
would not the inittab mod prevent login at boot too?
what if X does not start?
Offline
@Trixar_za: I fully agree, that's always possible.
I have been looking at [c]/etc/inittab[/c], thinking of using a daemon for temporarily commenting all those lines out. On detecting the proper scenario (i.e., presence of a given "legal" USB pendrive in any of the available USB ports), the daemon would uncomment [c]tty1[/c] line and would grant access to a potential user through that text console. Is that possible?
@ernia: Let's assume I can devise such a daemon. Your suggestion would comment all those lines in [c]/etc/inittab[/c] and... what exactly would do [c]kill -hup init[/c]? Wouldn't it be the equivalent to a hot reset? As far as I know, it would force [c]init[/c] to restart, wouldn't it?
Thanks a lot for being there.
Kind regards,
Antonio,
Offline
@ernia: As far as I know, X activities are conducted on [c]tty7[/c] only. If we limit this trick to consoles [c]tty1[/c] to [c]tty6[/c], there won't be any problem, isn't it?.
Did I properly understand [c]kill -1 1[/c]?
Thanks a lot.
Kind regards,
Antonio
Offline
kill -1 1 asks the init process to re-read /etc/inittab.
Offline
@Trixar_za, @ernia: I have just tested the trick and it works. Er... somehow!
I decided to lock all the consoles, refresh [c]init[/c], unlock [c]tty2[/c], refresh [c]init[/c] and try:
There's no activity on [c]tty2[/c], and [c]tty1[/c] accepts text but doesn't react to it.
Now, I have to leave now and will be back on early Monday. Once back at my desktop, I will restart the system with a Live CD and will try again with a different setup. Let's comment it then.
Thanks a lot.
Kind regards,
Antonio,
Offline
@arodulfo
it was Bellard to propose you kill -1 1 , i'm too noob to understand it :-)
Offline
@bellard: I have retyped everything and double-checked the trick, both through plain reboot and through live init refresh ([c]kill -1 1[/c]). I t works as smooth as anybody would expect.
It works both with tty1 and tty2 and I assume it would work with them all.
I made some typo most probably..
Now it's my time to code a way for including / combining this trick into / with my application...
Thank you so much to everybody!
Kind regards,
Offline
Pages: 1
[ Generated in 0.019 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]