*BSD News Article 94785


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!news.mathworks.com!europa.clark.net!feed1.news.erols.com!news.nl.innet.net!INnl.net!feed1.news.innet.be!INbe.net!blue.news.pipex.net!pipex!stns.news.pipex.net!warm.news.pipex.net!pipex!hole.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Howto restrict login at the console?
Date: 30 Apr 1997 10:14:20 GMT
Organization: Awfulhak Ltd.
Lines: 37
Message-ID: <5k761s$p26@ui-gate.utell.co.uk>
References: <3364F170.4DF6BC09@indigo.ie>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:40012


In article <3364F170.4DF6BC09@indigo.ie>,
	Marcus Keane <keanem@indigo.ie> writes:
> Hi!
> 
> I was just wondering if there was any way of restricting login at the
> console. What I'm after is the inverse(so to speak) of putting insecure
> on a line in /etc/ttys. That is, I only want root to login at the
> console. The machine isn't physically secure at the moment and I don't
> want people starting X sessions etc. I can login as root and lock the
> screen but I wouldn't trust people not to power cycle the machine when I
> wasn't around.

Something like

case .`tty 2>/dev/null` in
    /dev/ttyv?)  echo "Go away, you're not god !" >&2; exit 1;;
esac

in /etc/profile should suffice (assuming everyone at your site
uses [ba]sh).

> Cheers,
> 
> Marcus.
> 
> --
> 
> =======================================================================
>       Marcus Keane / Indigo Helpdesk        URL:http://www.indigo.ie/
>       email: keanem@indigo.ie               phone: Intl-353-1-6046913
> =======================================================================
> 

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !