From owner-freebsd-questions@FreeBSD.ORG Fri Feb 27 13:05:33 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88F2616A4CE for ; Fri, 27 Feb 2004 13:05:33 -0800 (PST) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58A5E43D39 for ; Fri, 27 Feb 2004 13:05:28 -0800 (PST) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i1RL5W1J031747; Fri, 27 Feb 2004 21:05:43 GMT (envelope-from peter@circlesquared.com) Message-ID: <403FB11C.8060308@circlesquared.com> Date: Fri, 27 Feb 2004 21:05:32 +0000 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031102 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Martin McCormick References: <200402271741.i1RHfuB7095761@dc.cis.okstate.edu> In-Reply-To: <200402271741.i1RHfuB7095761@dc.cis.okstate.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Search Path in bash2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 21:05:33 -0000 Martin McCormick wrote: > I am trying to modify the execution path on a FreeBSD system >for all the bash2 users on that system. The man page says that > > > >> default path is system-dependent, and is set by the >> administrator who installs bash. A common value is >> ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.''. >> >> > > How do I set, or in this case, reset it? > > The man page also says: When bash is invoked as an interactive login shell, or as a non-inter- active shell with the --login option, it first reads and executes com- mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. But so far as I have seen, at least on FreeBSD, /etc/profile does not generally contain path info. This is normally set in ~/.profile and the default contains something like this: # remove /usr/games and /usr/X11R6/bin if you want PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/ bin:$HOME/bin; export PATH So my guess is that to conform closely to this way of doing things, add the path to each user's ~/.profile and also to /usr/share/skel/dot.profile so it is there immediately for new users. Alternatively, unless someone contradicts this, the man page seems to suggest you could add a path to /etc/profile and it would then be system-wide. I have never done this myself, though, so can't vouch for it whereas I have edited ~/.profile frequently. HTH. PWR.