[Gllug] bash startup

Ian Northeast ian at house-from-hell.demon.co.uk
Thu Nov 1 20:48:08 UTC 2001


Vincent AE Scott wrote:
> 
> SteveC(steve at fractalus.com)@Thu, Nov 01, 2001 at 01:56:43PM -0500:
> > * Stephen Harker (steve at pauken.co.uk) wrote:
> > > On Thursday 01 November 2001 18:35, you wrote:
> > > > /me mumbles something about this being a *linux* user group... <g>
> >
> > bah humbug
> >
> > > > On BSDen you should be using vipw, you know. So if you've just done 'vi
> >
> > Wow, so I should. [RTFM!] Thanks for pointing that out!
> >
> > have fun,
> >
> 
> exactly what does vipw do other than lock the /etc/passwd while you edit it?
> 
> i was under the impression that it's safe to just use vi, so long as no one else > is editing the file at the same time.

On many systems, yes, including Linux. But not in *BSD as Stephen Harker
pointed out (yes it is the same in FreeBSD BTW). It does lock the
password file, yes, but more critically for the case in point it also
updates the *real* user database, which /etc/passwd isn't. As Stephen
said, it is /etc/master.passwd - although it is not impossible that this
could change at some new release, and the use of vipw will make it
continue to work properly if it does.

Anyway, isn't the best way to change shell, regardless of flavour of
almost-UNIX, "chsh"? It's certainly present in Linux, FreeBSD and
OpenBSD. Using chsh makes differences in how the user database is
physically implemented transparent.

Regards, Ian

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list