[uClinux-dev] agetty/login problems

Tom Walsh tom at cyberiansoftware.com
Fri Nov 30 21:17:28 EST 2001


Paul Carpenter wrote:
> 
> I'm trying to get login to work on my 5272C3 with release 2.0.38.1pre7.
> I've put the following line into /etc/inittab on the target:
> 
> ttyS0:vt100:/bin/agetty -l /bin/login ttyS0 19200
> When I boot the target, the normal kernel init. stuff is displayed,
> including the banner logo, then the command prompt appears.  If I do
> nothing, the login prompt appears after about 3 seconds.  However, if I try
> to type anything, nothing appears in the target window and the target
> appears to "lock up".  If, however, during those 3 seconds before the login
> prompt appears I type a valid command (e.g., "ls"), then when the login
> prompt appears I AM able to enter a login user and password.  I have NOT
> been able to successfully log in yet (I am using root/uClinux as user/pwd).
> So when it prompts me to try to log in again, it always locks up.
> 
> Three questions surface:
> 1. Why the delay from the banner logo/command prompt display until the login
> prompt appears?  Actually, shouldn't the login prompt come up BEFORE the
> command shell prompt?  Otherwise, we have a brief window of security
> vulnerability.

I have seen this, I suspect that you are starting another shell in the
/etc/rc..?

Here are my files for 2.0.38:

/etc/rc:
=================  begin  ============
hostname uClinux-ez328lcd

# expand the ramdisk
expand /etc/ramfs.img /dev/ram0

# mount ramdisk, proc and nfs
mount -t ext2 /dev/ram0 /var
mount -t proc proc /proc
mkdir /var/log
mkdir /var/tmp

ifconfig lo 127.0.0.1
route add -net 127.0.0.0 netmask 255.0.0.0 lo

ifconfig eth0 192.168.1.201 broadcast 192.168.1.255 netmask
255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 eth0
route add default gw 192.168.1.2

portmap &
mount -t nfs 192.168.1.3:/home/opt/ez328lcd/pub /usr

================= snip ===============


/etc/inittab:

================== begin =============
# inittab for uClinux
# Format:
# ttyline:termcap-entry:getty-command
inetd:unknown:/bin/inetd
boa:unknown:/bin/boa
ttyS0:vt100:/bin/agetty 115200 /dev/ttyS0
================== snip ==============


Make sure that the serial driver code for the console uses the same
baudrate as you specified in the inittab.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list