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'm trying to login to a server through the serial port using agetty. When I start agetty and open the serial connection, I see the login prompt but as soon as I enter the username (in my case root), agetty gets killed. Not only that, along with agetty, it's parent shell is also being terminated. The following command sequence illustrates this. After starting agetty(the second line), I try to login through the serial port but end up losing the connection as below.

ROOT@dir1(~)
(0)#agetty 115200 /dev/ttyS0
Connection to dir1 closed.

Any suggestions on why this might be happening? I'm using SLES version 10 and the serial port is connected to a terminal server that is being accessed through a web browser. I'm not sure if rebooting the server with an entry in inittab would make a difference but I'm not inclined towards that as this is a production server and down-times are expensive.

Thanks.

share|improve this question
    
Thanks for your reply @MichaelHampton. That worked for me! Although I'm still curious why it would not work when I directly invoke agetty through command line. Can you please throw some light on that? Thanks! –  AnlKumr Jun 4 '13 at 2:05
add comment

1 Answer

up vote 1 down vote accepted

You should have this in inittab, and you don't have to reboot. Just telinit q.

As for agetty in a shell, it really was not designed to run in the foreground and control some other terminal; while you could pass it a tty argument of -, this would cause it to print a login prompt in your terminal, rather than on the serial port, which isn't what you want.

share|improve this answer
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.