Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 1999 08:39:02 +0000
From:      Mark Ovens <marko@uk.radan.com>
To:        Greg Black <gjb@comkey.com.au>
Cc:        questions@freebsd.org
Subject:   Re: Can't change shell - Please help newbie
Message-ID:  <19990221083902.A258@localhost>
In-Reply-To: <19990221005745.7091.qmail@alpha.comkey.com.au>; from Greg Black on Sun, Feb 21, 1999 at 10:57:45AM %2B1000
References:  <913B8C252194D2119BD500805F318178030416@za12nt02.mweb.com> <19990220124307.E185@localhost> <19990221005745.7091.qmail@alpha.comkey.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Why have I been singled out for a lecture here Greg? You haven't
Cc:'d the 2 other respondents. Your comments could equally well
apply to them also.

On Sun, Feb 21, 1999 at 10:57:45AM +1000, Greg Black wrote:
> First, please trim the irrelevant elements of posts that you
> respond to (see the regular article about how to get the best
> from the list if this is a puzzle).
> 

I have read the regular article, and no, it isn't a puzzle.

I take it that by "irrelevant elements" you mean the original
poster's .sig, since Charon back-quoted the entire message, except
for the .sig, as well.

> > How are you editing the password file? If you are just editing
> > /etc/passwd it won't work. Use vipw(8). When you save and exit vipw
> > re-builds the passwd database.
> 
> It might be useful to explain why editing /etc/passwd is no use,
> since that has been for many years (and still is, in many cases)
> the canonical way to do these things.
> 

My reply was pretty much the same as Jim Mock's yet I don't see
Jim's name in the To: or Cc: fields of your e-mail.

It didn't seem necessary to go into detail of how the password file
mechanism works. The original poster only wanted to know how to
change his default shell and mentioned that he had tried editing
/etc/passwd and it didn't work.

> FreeBSD (like many other modern systems) provides both "shadow"
> passwords and a variety of extra fields that are not part of the
> traditional /etc/passwd file.  All this magic is contained in
> the new passwd file (/etc/master.passwd) and this is the file
> that must be edited (using vipw) for changes to take effect.
> 
> After the editing is done, vipw does what is needed to update
> both /etc/passwd and the hashed database files -- which are the
> files that are really accessed by all the lookup routines.
> 
> RTFM for a fuller description, starting with passwd(5).
> 

I have RTFM, quite recently as well. Due to a utility truncating
/etc/passwd, /etc/master.passwd and /etc/groups to zero bytes I
had to figure out how to repair the damage.

> -- 
> Greg Black <gjb@acm.org>
> 
> 

-- 
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://www.users.globalnet.co.uk/~markov
_______________________________________________________________
Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK
CAD/CAM solutions for Sheetmetal Working Industry
mailto:marko@uk.radan.com                  http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990221083902.A258>