NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: System-wide PATH



On Fri, Dec 24, 2010 at 03:59:36PM -0500, matthew sporleder wrote:
> Bash is also an sh (bourne) shell.
> 
> On Fri, Dec 24, 2010 at 3:39 PM, IT geek 31 
> <itgeek31%googlemail.com@localhost> wrote:
> > I forgot to mention that my shell is Bash, compiled from source (into
> > /usr/local/bin/bash).
> >
> >
> >
> > On 24 December 2010 20:28, matthew sporleder 
> > <msporleder%gmail.com@localhost> wrote:
> >> On Fri, Dec 24, 2010 at 3:08 PM, IT geek 31 
> >> <itgeek31%googlemail.com@localhost> wrote:
> >>> Hi,
> >>>
> >>> I need to modify the system-wide PATH, mainly to ensure /usr/pkg/bin
> >>> and /usr/pkg/sbin are used first.
> >>>
> >>> Where do I do this? ?I STFW'd and came up with nothing conclusive :-(
> >>>
> >>> Many thanks
> >>>
> >>
> >> For sh and ksh you might want to do a few things:
> >>
> >> Make your system-wide changes to /etc/profile
> >>
> >> Then check in /etc/skel/.profile because by default it has
> >> PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin,
> >> which overrides stuff in /etc/profile.
> >>
> >> You might want to change that to:
> >> PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin
> >>
> >> Any users created would get ~/.profile from /etc/skel.
> >>
> >> For csh it's /etc/csh.cshrc and then /etc/skel/.cshrc, etc.
> >>
> >> Matt
> >>
> >
> 
I didn't see anyone mention: /etc/login.conf

That is what I used.

I changed the path for the default user class. In my case I added
/usr/local/bin.

NetBSD has a concept of login-class which gives finer grained control
over users then editing /etc/profile.

-- 
markov%sdf.lonestar.org@localhost
SDF Public Access UNIX System - http://sdf.lonestar.org


Home | Main Index | Thread Index | Old Index