Limiting access

Len Ovens (root@martin.cbbs.org)
Sat, 13 Sep 1997 21:27:57 -0700




On Sat, 13 Sep 1997, Alexis S. Panagides wrote:

> Maybe I have to replace the entire login program? If so, does anyone have
> an example login program (in Perl or shell script) that I could examine? I
> think it would be pretty easy to modify, I just don't know the dynamics of

What I do is drop a program in between mgetty and login... It sends out the
info login needs the execs login.

In your case you could take the user name and see if there are any processes
belonging to that user and exit if so or execute login if not.

> a login program, ie. how should it exit to be interpreted by mgetty as
> success or failure, how should it get the password (seems the username
> comes in as the 1st argument).

Mgetty is out of the picture by that time. If you exit, the line will get
hung up and reset... that is all you need to know... as for the password
verification... I don't know. I figure login does a fine job and so I would
leave it :-) but because mgetty lets you tell it which program to call when
someone connects, you can have it talk to anything and have that one execute
login. I actually set some of the evironment and check for new users. I ask
for their name and phone number and then save them in a file and also set
their name in the environment and log them in as user new. (with a captive
menu setup... no shells :-) But mail gets sent as from:

 First Last <new@studio.cbbs.org>

But I can still use the new account for more than one person.

I am just now changing things so it checks the phone number they give
against the CID number... I figure if they don't match, I don't need them...

Len
.