Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a machine running Ubuntu Server. It has only a command-line interface. How can I make the system login with a specific user automatically (I don't want to type the username/password). I know that this is insecure and I don't care.

share|improve this question
    
Are you talking about logging in from the console or a remote system? If you are connecting from a remote system just setup SSH key-based authentication. –  Zoredache Jun 17 '10 at 0:17
    
Sorry I should have been clearer. I mean from the console of the machine. –  hekevintran Jun 17 '10 at 0:21
add comment

1 Answer

up vote 0 down vote accepted

Install mingetty.

sudo apt-get install mingetty

Edit your /etc/event.d/tty1 and change this line:

exec /sbin/getty 38400 tty1

to:

exec /sbin/mingetty --autologin username tty1
share|improve this answer
    
I did not have a file called /etc/event.d/tty1. I created one and followed the rest of the instructions, but it doesn't work. –  hekevintran Jun 17 '10 at 7:01
    
@hekevintran: What version of Ubuntu? Do you have a /etc/init/tty1.conf? If so, make the change there. –  Dennis Williamson Jun 17 '10 at 9:36
    
I'm running 10.04. –  hekevintran Jun 17 '10 at 10:28
    
Yeah editing that file did the trick. Thanks. –  hekevintran Jun 17 '10 at 10:36
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.