*BSD News Article 70922


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.uio.no!news.cais.net!newsfeed.internetmci.com!newsfeeder.gi.net!news.aristotle.net!usenet
From: cshivers@aristotle.net
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: BSDI User Accounts
Date: Fri, 14 Jun 1996 02:35:04 GMT
Organization: Aristotle Internet Access
Lines: 39
Message-ID: <4pqc43$3s2@socrates.aristotle.net>
References: <31B3180D.4243@bekkers.com.au> <4pkv0r$civ@mercury.galstar.com>
NNTP-Posting-Host: twenty2.aristotle.net
X-Newsreader: Forte Free Agent 1.0.82

jmccorm@galstar.com (Josh McCormick) wrote:

>Jamie Bekkers (jamie@bekkers.com.au) wrote:
>: 
>: I have scoured our manuals and could not find what I wanted, so I hoped 
>: that some kind person out there could tell me how to do this.

>: I want to disable a user account, but not so they can not log in.  But 
>: rather it would give then a message like: "Your account has been disabled 
>: due to system abuse" and then log them off?

>Here is a simple C program called "acct_disabled" to compile:

>main() {
>  char *a;
>  printf ("\n\nYour account has been disabled due to system abuse.\n");
>  printf ("\nPress [ENTER] to disconnect.\n\n");
>  read(0,a,1);
>  exit(0);
>}

Where would you locate the file?
>Once it is compiled and placed in an appropriate place in your filesystem,
>you simply set their login shell to be this program. They will be denied
>the ability to login or FTP to their account. Do _NOT_ add this program to
>"/etc/shells". 

>One change you may want to make to the program is to replace the read 
>statement with a sleep command for fifteen seconds or so.

>-- 

>=====================================================================
>== Josh McCormick             Galaxy Star Systems                  ==
>== jmccorm@galstar.com        Providing Quality Internet Access    ==
>== Systems Administrator      WWW: http://www.galstar.com/~jmccorm ==
>=====================================================================