bill@twwells.uucp (T. William Wells) (04/25/89)
I posted a getty clone on alt.sources a while ago. It works fine, except for one teensy problem....! When I first posted it, someone sent me a message asking what I did to deal with the kludge that Microport put into their getty to prevent more accesses than your licence allowed. I told him that I had done nothing because it worked fine as it was. Then I went and modified my inittab so that it spawned an su on /dev/console instead of a getty. And my system stopped working. (Why would I want an su on /dev/console? Well, my system is physically secure, I have virtual consoles, and I really want a way to log in regardless of the state of my getty or /etc/passwd or whatever.) What happens is this: when init first runs a getty, it sets a flag in the kernel which it expects the first getty to clear. Since I, being paranoid, kept the original Microport getty running on /dev/console, that flag got cleared. BUT, when I ran su directly instead of the getty, the flag wasn't cleared and init refused to spawn any more processes. So I went back to the standard getty for /dev/console till I had time to hunt down a kludge to make things do what I want. Tonight, I found the kludge. It prevents init from setting the flag. I'm running Microport V/386 3.0e. Here's what you do in order to run a non-Microport getty: FIrst, run sum and sum -r on init to verify that you are using the same init as I am. I get: sum: 31759 77 sum -r: 38877 77 Then make a copy of /etc/init, say in /tmp/init, and then patch it with the command: adb -w /tmp/init <<\+ 0x40028c?w0 + Now run sum and sum -r on the new init. You should get these numbers: sum: 31758 77 sum -r: 14226 77 Assuming you get those numbers, rename /etc/init to /etc/init.old, copy /tmp/init to /etc/init, and then reboot. Make sure you have another way to boot in case something gets screwed up. *IF* you can reboot with no Microport gettys running on your system and *IF* you can log out and then back in on the system console (or init respawns the su on logout if you are doing what I do), then you can get rid of the old init and the Microport getty if you want. (They're not going to like me for this: I have a sneaking suspicion that this completely disables the login count checking.) Note that followups have been directed to comp.unix.i386. --- Bill { uunet | novavax } !twwells!bill