[BusyBox] how to get login to ask for password on a given port?
Robert P. J. Day
rpjday at mindspring.com
Tue Mar 23 19:05:09 UTC 2004
On Tue, 23 Mar 2004, David Meggy wrote:
> On Tue, 2004-03-23 at 10:22, Robert P. J. Day wrote:
> >
> > # getty -L 9600 ttd/0 & # "-L" for local line, so don't do DCD
>
> Try just adding this to /etc/inittab. That is where login's belong and
> will get automatically started at boot.
>
> > have i missed a critical option here? how does getty pass on the info
> > to /bin/login as to which port to continue to use?
>
> try running "ls -l /proc/[login process number]/fd/"
>
> You can then see what it's standard file descriptors are.
an excellent suggestion, which showed the following: the initial getty
had fds:
0 -> /dev/ttd/0
1 -> /dev/ttd/0
2 -> /dev/ttd/0
all correct. once we typed in the username, and login was exec'ed,
the login fds were:
0 -> /dev/ttd/0
1 -> /dev/ttd/0
2 -> /dev/ttd/0
3 -> /dev/tty ???
not sure where fd 3 came from, but it's obviously the one being used
by the login program since it corresponds to the current console, which
i verified with:
# echo HI > /dev/tty
how exactly do i get login to keep working with /dev/ttd/0?
rday
More information about the busybox
mailing list