Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 1997 12:08:47 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        A Ling <al52x@nih.gov>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Problem with chsh/vipw
Message-ID:  <Pine.BSF.3.96.970807120608.252f-100000@localhost>
In-Reply-To: <199708071506.LAA16012@pop.cc.nih.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970807120608.252f-100000>