From owner-freebsd-questions Thu Aug 7 12:08:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA24747 for questions-outgoing; Thu, 7 Aug 1997 12:08:59 -0700 (PDT) Received: from gdi.uoregon.edu (cisco-ts16-line10.uoregon.edu [128.223.150.210]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA24742 for ; Thu, 7 Aug 1997 12:08:54 -0700 (PDT) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.8.5) with SMTP id MAA00500; Thu, 7 Aug 1997 12:08:47 -0700 (PDT) Date: Thu, 7 Aug 1997 12:08:47 -0700 (PDT) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: A Ling cc: "freebsd-questions@FreeBSD.ORG" Subject: Re: Problem with chsh/vipw In-Reply-To: <199708071506.LAA16012@pop.cc.nih.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 7 Aug 1997, A Ling wrote: > Prior to recent messages here regarding chsh & vipw, I > edited /etc/passwd & /etc/master.passwd (using ee) to alter > my default shell. > When I use either chsh or vipw, they > both initially show the default shell of users aling or mmc to be > /bin/sh, despite contents of master.passwd & passwd as below. Yes, it is showing you what is in the real password database. See pwd_mkdb(8). > Clearly, this state information is stored somewhere else, and > accounts for why my earlier edits failed. After editing to either > /bin/csh or /usr/local/bin/tcsh, both chsh & vipw show errors > in pwd_mkdb such as follows: > > "/etc/pw.000237" 14 lines, 303 characters > chsh: WARNING: shell '/bin/tcsh' does not exist > chsh: rebuilding the database... > pwd_mkdb: corrupted entry > pwd_mkdb: at line #13 > pwd_mkdb: /etc/pw.000237: Inappropriate file type or format > chsh: /etc/master.passwd: unchanged > > and similarly for passwd. I'm confused because I'm sure I > didnt have '/bin/tcsh' by the time I left the editor, saving > the changes. Need I return /etc/passwd & /etc/master.passwd > to their initial state before using chsh/vipw? I guess I > could extract the initial state of any other pertinent files in > /etc from the bin.* part of the distribution, but was hoping > someone here might recognize how to help me avoid that. > I'm running 2.2.2-R. Since you broke master.passwd, you need to fix it and run pwd_mkdb against it to compile it in. And in the future use vipw. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major Spam routed to /dev/null by Procmail | Death to Cyberpromo