*BSD News Article 60246


Return to BSD News archive

Newsgroups: comp.unix.bsd.bsdi.misc
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!paladin.american.edu!gatech!newsfeed.internetmci.com!primus.ac.net!news.cais.net!news.supernet.net!news.magicnet.net!moses.gencon.com!sgb!steven
From: steven@sgb.oau.org (Steven Bradley)
Subject: Re: help...restricted shell using freebsd
Organization: The Forest City Exchange, Forest City, Florida
Date: Mon, 22 Jan 1996 04:10:38 GMT
Message-ID: <DLKE9s.1Ds@sgb.oau.org>
X-Newsreader: TIN [version 1.2 PL2]
References: <30FFA30B.1B8B@cbn.net.id>
Lines: 20

Endang Rachmawati (endang@cbn.net.id) wrote:
: I need to make a restricted shell so that the user will only
: be able to use his/her directory but cannot go anywhere else.

: I tried to make the programm as the user shell, but he can only
: get out of the program entring his directory by hitting "^C".

Add:

trap "exit" 1 2 3 15

To .profile for user account.  Make sure user can not change .profile!
That _should_ do it.

Steven
-- 
Steven Bradley               121 Cambridge Drive, Longwood, FL  32779-5707
steven@magicnet.net          Home: (407) 862-7226  Work: (407) 621-3300 x310
"Therefore I say to you, all things for which you pray and ask, believe that
 you have received them, and they shall be granted to you."       Mark 11:24