Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <200506072010.j57KAKea003183@tigris.pounder.sol.net> To: cygwin AT cygwin DOT com From: cygwin AT trodman DOT com (Tom Rodman) Subject: how2 set PATH for noninteractive restricted rbash shell? Date: Tue, 07 Jun 2005 15:10:20 -0500 X-IsSubscribed: yes I want to be able to run a noninteractive command like ssh joedoe AT myhost DOT mydomain DOT xxx somecommand where user "joedoe" has /bin/rbash in /etc/passwd for a shell. How do I restrict the PATH that is seen for the above ssh session? I have tried changing and exporting PATH in ~joedoe/.bashrc but this file is not read by prior to running "somecommand" above. As a workaround I'm thinking of writing small c program wrapper shell that does a "setenv" to set the path prior to calling rbash. Sorry for the terse problem description, I know I'm rushing a bit.. -- thanks, Tom Rodman -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/