From owner-freebsd-bugs Fri Jul 7 9:30: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BB37737BE75 for ; Fri, 7 Jul 2000 09:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA94008; Fri, 7 Jul 2000 09:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from byzantine.student.umd.edu (byzantine.student.umd.edu [129.2.228.41]) by hub.freebsd.org (Postfix) with ESMTP id 046F837B5C7 for ; Fri, 7 Jul 2000 09:20:21 -0700 (PDT) (envelope-from howardjp@byzantine.student.umd.edu) Received: (from howardjp@localhost) by byzantine.student.umd.edu (8.9.3/8.9.3) id MAA77327; Fri, 7 Jul 2000 12:20:20 -0400 (EDT) (envelope-from howardjp) Message-Id: <200007071620.MAA77327@byzantine.student.umd.edu> Date: Fri, 7 Jul 2000 12:20:20 -0400 (EDT) From: James Howard Reply-To: howardjp@byzantine.student.umd.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/19755: nologin not configurable Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19755 >Category: bin >Synopsis: nologin not configurable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 07 09:30:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: James Howard >Release: FreeBSD 5.0-CURRENT i386 >Organization: Arbornet.org >Environment: FreeBSD 5 >Description: I wanted to displaya specific text message when a specific user logs in using nologin.8. But nologin only has a certain static message. So I modified it to fix the problem :) >How-To-Repeat: N/A >Fix: diff -u nologin.orig/nologin.8 nologin/nologin.8 --- nologin.orig/nologin.8 Thu Jul 6 22:58:19 2000 +++ nologin/nologin.8 Thu Jul 6 22:58:00 2000 @@ -46,6 +46,23 @@ exits non-zero. It is intended as a replacement shell field for accounts that have been disabled. +.Pp +.Nm Nologin +first looks in the user's home directory for +.Pa ~/.nologin +and displays its contents before exiting. If that file does +not exist or is not readable, +.Nm +will look in +.Pa /etc/nologin +for the message. Finally, if no suitable message is found, the +text "This account is currently not available." is displayed. +.Sh FILES +.Bl -tag -width /etc/nologin -compact +.It Pa ~/.nologin +User specific warning message +.It Pa /etc/nologin +System wide warning message .Sh SEE ALSO .Xr login 1 , .Xr nologin 5 . diff -u nologin.orig/nologin.sh nologin/nologin.sh --- nologin.orig/nologin.sh Thu Jul 6 22:58:19 2000 +++ nologin/nologin.sh Thu Jul 6 22:53:20 2000 @@ -35,5 +35,12 @@ # $FreeBSD: src/sbin/nologin/nologin.sh,v 1.4 1999/08/28 00:13:57 peter Exp $ # -echo 'This account is currently not available.' +if [ -r ~/.nologin ]; then + cat ~/.nologin +elif [ -r /etc/nologin ]; then + cat /etc/nlogin +else + echo 'This account is currently not available.' +fi + exit 1 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message