Autologin Table of Contents Creating john Autologin john Autostarting X This page describes how to create the user john and automatically log him in when booting Arch Linux. We assume that you're issuing all commands described here on your device.
# useradd –create-home john This will add the user john and create the directory /home/john.
Next we need to edit the /etc/inittab file to launch a custom login script instead of /bin/login. Find the line
c1:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
and change it to
Of course we have to create the file /bin/autologin which takes care of logging the user which is passed as argument.
exec /bin/login -f $1
Put this shell script under /bin and make sure it is owned by root:root and has the correct permissions -rwxr-xr-x.
# chown root:root /bin/autologin # chmod 755 /bin/autologin Now you can reboot your smartphone and be already logged in as john. Have fun!
If you automatically want to log into X you can just add the following line to your shell's startup file (e.g. ~/.bashrc for bash)