Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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
add comment

2 Answers

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
add comment

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

 startx

fi

save and reboot.

Reference: http://tombuntu.com/index.php/2010/01/01/enable-automatic-login-in-ubuntu-9-10-server/

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.