From owner-freebsd-isp Tue Jan 20 11:30:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA27532 for freebsd-isp-outgoing; Tue, 20 Jan 1998 11:30:53 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from idiom.com (root@idiom.com [140.174.82.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA27515 for ; Tue, 20 Jan 1998 11:30:39 -0800 (PST) (envelope-from muir@idiom.com) Received: (from muir@localhost) by idiom.com (8.8.5/8.8.5) id KAA21613 for freebsd-isp@freebsd.org; Tue, 20 Jan 1998 10:36:24 -0800 (PST) Date: Tue, 20 Jan 1998 10:36:24 -0800 (PST) From: David Muir Sharnoff Message-Id: <199801201836.KAA21613@idiom.com> To: freebsd-isp@FreeBSD.ORG Subject: Re: How to lock out a nonpaying user Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I took a stab at this problem a few years ago (note date on file). This works great. It gives me a large set of messages. I lock someone out by changing their shell. Now, the question I have is, how do you have RADIUS respond with a message when someone tries to log in via PPP? -Dave #ifdef notdef /* * * given that this is called with an argv[0] like "-badpasswd" (init does * this if the shell entry is "/.*/badpasswd" Then cat whatever is * in the file $MSGDIR/badpasswd to stdout and exit. * * To give someone a shell that just prints out a message, make * a file (called "name") with the message in /usr/adm/shells/msgs * and then do a ln /usr/adm/shells/name /usr/adm/shells/shell. * * muir@cogsci 3/30/86 * */ #endif #include #include #include #define MSGDIR "/usr/adm/shells/msgs" char buf[BUFSIZ]; main(argc,argv) int argc; char *argv[]; { register int input; register char name[1024]; register int bytes; sprintf (name,"%s/%s",MSGDIR,argv[0]+1); input = open (name, O_RDONLY); if (input < 0) { puts ("there has been a error, please contact"); puts ("the system manager to have your account fixed."); perror(name); exit(1); } while ((bytes = read(input,buf,BUFSIZ)) > 0) write (1,buf,bytes); close (input); exit(0); }