2

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.

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

2 Answers 2

0

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

1
  • 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, 2012 at 14:55
0

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/

1
  • 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, 2012 at 16:54

You must log in to answer this question.