Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to realize a multisensor system (without Display or keyboard) which needs sudo rights directly after bootup (Ubuntu 12.04 server for ARM). Therefore, I would like to automatically login as root. (just turn on the power and the system will boot without any password request etc) I know that this isn't recommended but some USB issues forcing me to use root rights. I'm perfectly aware of what I'm doing so please don't tell me not to do it. I looked up the web but could find a solution...

It would be great to get your help. Thank you.

share|improve this question

migrated from Oct 15 '12 at 22:06

This question came from our site for professional and enthusiast programmers.

What is the specific question / problem? Everything get started as root at boot time. – January Oct 15 '12 at 14:45
I just want to login as root directly and not using $ sudo su or similar – user1455085 Oct 15 '12 at 14:47
Sorry, I thought you are starting a service. – January Oct 15 '12 at 16:19

If it is you own application then right a bash shell script to start restart and stop the application and put it in your /etc/init.d directory. Then run the command update-rc.d

share|improve this answer
This is not what I'm looking for. Its kind of a whole enviroment who needs sudo rights not just a single application... – user1455085 Oct 15 '12 at 14:55

Try following

sudo vim /etc/init/tty1.conf

Change the last line of this file to (where USERNAME is the username of the user you want to log in): exec /bin/login -f USERNAME < /dev/tty1 > /dev/tty1 2>&1

Save it and do following

vim ~/.bashrc

if [ $(tty) == "/dev/tty1" ]; then



save and reboot.


share|improve this answer
Sorry but I tried this method before and it didn't work... Also I don't need to start the graphical interface because I'm using a server version (just terminal) – user1455085 Oct 15 '12 at 16:54

You must log in to answer this question.