From owner-freebsd-questions Sun Feb 21 0:43: 7 1999 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by hub.freebsd.org (Postfix) with ESMTP id 66B381134D for ; Sun, 21 Feb 1999 00:43:03 -0800 (PST) (envelope-from marko@uk.radan.com) Received: from [158.152.75.22] (helo=uk.radan.com) by post.mail.demon.net with smtp (Exim 2.12 #1) id 10EUTc-000K7m-00; Sun, 21 Feb 1999 08:43:01 +0000 Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from marder-1. (rasnt-1 [193.114.228.211]) by uk.radan.com (8.6.10/8.6.10) with ESMTP id IAA01282; Sun, 21 Feb 1999 08:42:32 GMT Received: (from marko@localhost) by marder-1. (8.8.8/8.8.8) id IAA00327; Sun, 21 Feb 1999 08:39:03 GMT (envelope-from marko) Message-ID: <19990221083902.A258@localhost> Date: Sun, 21 Feb 1999 08:39:02 +0000 From: Mark Ovens To: Greg Black Cc: questions@freebsd.org Subject: Re: Can't change shell - Please help newbie References: <913B8C252194D2119BD500805F318178030416@za12nt02.mweb.com> <19990220124307.E185@localhost> <19990221005745.7091.qmail@alpha.comkey.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <19990221005745.7091.qmail@alpha.comkey.com.au>; from Greg Black on Sun, Feb 21, 1999 at 10:57:45AM +1000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > > -- 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