This howto show you howto get Linux to auto login in multi-user mode(non-GUI) at bootup.
| ||||
About:Ratings |
Requirements
- getty, or agetty; any getty that supports executing files (mingetty does not)
- gcc: usually standard http://gcc.gnu.org
- a boot disk or live cd is a good idea. If you make a mistake your computer may not boot up properly.
Steps
You may not boot up if this isn't done properly, and these steps may not be the same for your computer
- edit a file: for example 'autologinz.c', and add
- int main() { execlp( "login", "login", "-f", "zymos", 0); }
- Compile the file by executing this command:
- gcc -o autologinz autologinz.c
- make sure autologinz is executable. For help See: Howto to change file permissions in unix
- edit '/etc/inittab', and on line that looks similar to the following
- c1:2345:respawn:/sbin/agetty 38400 tty1 linux or
- 1:2345:respawn:/sbin/mingetty tty1
- Replace that line with the following using the location of your executable
- 1:2345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologinz 38400 tty1
- reboot
- If you computer does not boot up properly use you boot disk to replace the line in '/etc/inittab' to its original and read 'man getty'