Selectively disable login at specified line?

Jonathan S. Shapiro shap at polya.Stanford.EDU
Sun Oct 2 09:24:03 AEST 1988


In article <659 at mtxinu.UUCP> ed at mtxinu.UUCP (Ed Gould) writes:
>>We want to restrict login-access at a specified terminal line
>>to a group of designated users, with the other ttys still
>>accessible to all users.
>
>The /etc/ttys file specifies the program to be run to capture the
>login name: typically /etc/getty.  You can use any program of your
>own design instead, however.  The functions of getty are, essentially,

Unfortunately, Ed is not quite right here, because of the following:

	Getty:    login:
	me:       shap
	...getty execs login...
	login:    passwd:
	me:       BOGUS (intentionally mistyped)
	*login*:  login:

A better place to enforce this sort of thing is to put in /etc/profile
and /etc/.login a line to check the tty line against the users group,
and log them out if the check fails.

This doesn't involve writing any special code.



More information about the Comp.unix.wizards mailing list