Date: Thu, 07 Aug 97 11:06:04 -0400 From: "A Ling" <al52x@nih.gov> To: "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG> Subject: Problem with chsh/vipw Message-ID: <199708071506.LAA16012@pop.cc.nih.gov>
next in thread | raw e-mail | index | archive | help
Prior to recent messages here regarding chsh & vipw, I edited /etc/passwd & /etc/master.passwd (using ee) to alter my default shell. But when I exit & login again, the default is still /bin/sh, presumably because at the time I was unaware of pwd_mkdb. As a workaround, I put either /bin/csh -l or, taking an earlier suggestion, downloading tcsh, with /usr/local/bin/tcsh -l as the last line in each user's .profile file -- clearly not the right way. 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. 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 where root@/root> cat /etc/master.passwd root:(snipped):0:0::0:0:Charlie &:/root:/bin/csh toor:(snipped):0:0::0:0:Bourne-again Superuser:/root: daemon:*:1:1::0:0:Owner of many system processes:/root:/nonexistent operator:(snipped):2:20::0:0:System &:/usr/guest/operator:/bin/csh bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/nonexistent games:*:7:13::0:0:Games pseudo-user:/usr/games:/nonexistent news:*:8:8::0:0:News Subsystem:/:/nonexistent man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/nonexistent uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/nonexistent nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/nonexistent aling:(snipped):1001:1001::0:0:User &:/home/aling:/usr/local/bin/tcsh mmc:(snipped):1002:1001::0:0:M Ling:/home/mmc:/usr/local/bin/tcsh www:(snipped):1003:1002::0:0:WWW server etc:/home/www:/usr/local/bin/tcsh 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. Allow me to add that I am very grateful to all the people who have made FreeBSD possible and available -- I'm amazed by what I've seen so far. Alex Ling AL52x@nih.gov (301) 496-7700 x235
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708071506.LAA16012>