Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!bellcore!texbell!killer!usource!frankb From: frankb@usource.UUCP (Frank Bicknell) Newsgroups: comp.unix.xenix Subject: Re: Xenix login source Summary: automatic logins Keywords: xenix login source needed Message-ID: <171@usource.UUCP> Date: 1 Mar 89 15:31:13 GMT References: <168@biar.UUCP> Organization: UniSource, Inc., Sarasota, FL Lines: 47 In article <168@biar.UUCP>, trebor@biar.UUCP (Robert J Woodhead) writes: > I am setting up a special access system and want to bypass > login; in other words, when activity is detected on a serial > line, I want to spoof the login procedure, log into a > specific account, and start running my program. I _think_ what you want to do is covered in an article in the Mar/Apr '88 issue of DiSCOver. To summarize, you put the AUTO keyword in a new /etc/gettydefs entry. The example given was: p # B9600 CS8 SANE ICANON TAB3 IXANY # B9600 CS8 SANE TAB3 IXANY #\r\n@!login: # p # AUTO /etc/login I tried that and it seems to work. I'm not sure what the second line is still around for: login doesn't use the prompt. Oh, well, excess baggage. You edit /etc/ttys to include 'p' in the second position for the tty which will be used. Unlike what it hints at in the article, be sure the port is disabled when you edit its /etc/ttys entry. Then you use mkuser to create a user with the same name as the port the application will be run on. Eg: tty1a is the user name. Forget the password: getty isn't going to run the part of the program that asks for it anyway. You should modify .profile to run the application you wish to use. Now enable the port in the usual way. The terminal will come right up without having to log in. You'll find that you can't disable the port :) . OOPS. They forgot to mention that. Here's how: First send init a SIGQUIT signal: kill -3 1 Then log off the port or kill all the processes associated with it. Disable the port as you normally would. Finally, send init a SIGINT signal: kill -2 1 Note that new logins will be disabled after you do the kill -3 1. After you're through experimenting and have it right, reboot to cause init to start respawning new logins. Is there an easier way to break into such a loop to disable the terminal? (be glad when SCO brings forth inittab: changing the machine state won't be so kludgy.) -- Frank Bicknell; 1405 Main St, Ste 709; Sarasota, FL 34236-5701 killer!usource!frankb