*BSD News Article 70057


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!qns3.qns.com!imci4!newsfeed.internetmci.com!howland.reston.ans.net!Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet
From: j@ida.interface-business.de (J Wunsch)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: BSDI User Accounts
Date: 3 Jun 1996 11:45:04 GMT
Organization: interface business GmbH, Dresden
Lines: 29
Message-ID: <4ouj80$7ib@innocence.interface-business.de>
References: <31B3180D.4243@bekkers.com.au>
Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch)
NNTP-Posting-Host: ida.interface-business.de
X-Newsreader: knews 0.9.6
X-Phone: +49-351-31809-14
X-Fax: +49-351-3361187
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

Jamie Bekkers <jamie@bekkers.com.au> wrote:

> 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?

#!/bin/sh

echo "Your account has been disabled due to system abuse."

mail -s "Disabled account" root <<EOF
Hi,

user ${USER} has just tried to log in, and has been told that
his account has been disabled.

			Yours sincerely,
			The Friendly NoLogin Script
EOF

exit 0

...put this into a script, run chmod 555 on it, and enter the pathname
of this script in the shell field for this user (best done with chsh).

-- 
J"org Wunsch					       Unix support engineer
joerg_wunsch@interface-business.de       http://www.interface-business.de/~j