출처 : http://www.timelordz.com/wiki/Alt-F8_Console_Hacks

 

Alt-F8 Console Hacks - Lyceum

In a secure environment, having fast access to servers can be a good thing. It allows very very fast support without having to wait for credentials, etc. (Yes, some could argue how very disconcerting this is - but consider the fact that this assumes you already have physical access to the server, in which case all other bets are already off.)

So, how do you set up instant root? Well, it depends on your flavor of *Nix, but here are a few ideas:

Red Hat / CentOS

Super simple, just add this line to /etc/rc.local

/usr/bin/openvt -c 8 /bin/bash

This opens a virtual terminal and assigns it as tty8. Now, when you hit ctlr-f8 you get a root shell. Done.

Debian / Ubuntu

Debian's rc.local is not the same as Red Hats. For Debian systems, create a cusotmer script and assign the run levels it is active in by:

cd /etc/init.d/
vim rc.custom

 This should contain: 
 #!/bin/bash
 /usr/bin/openvt -c 8 /bin/bash 

chmod +x rc.custom 
update-rc.d rc.custom defaults
/etc/init.d/rc.custom start
ps aux | grep bash
 (Will show something like the below, indicating bash is running on tty8)
Alt-F8 Console Hacks

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다