From owner-freebsd-stable Fri Jul 10 13:47:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA10809 for freebsd-stable-outgoing; Fri, 10 Jul 1998 13:47:30 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from mirage.nlink.com.br (mirage.nlink.com.br [200.238.120.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA10709 for ; Fri, 10 Jul 1998 13:47:18 -0700 (PDT) (envelope-from paulo@nlink.com.br) Received: from localhost (paulo@localhost) by mirage.nlink.com.br (8.9.0/8.9.0) with SMTP id RAA02201; Fri, 10 Jul 1998 17:45:37 -0300 (EST) Date: Fri, 10 Jul 1998 17:45:37 -0300 (EST) From: Paulo Fragoso To: Tom cc: freebsd-stable@FreeBSD.ORG Subject: Re: Finger and getpwent In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, On Fri, 10 Jul 1998, Tom wrote: > > On Fri, 10 Jul 1998, Paulo Fragoso wrote: > > > Hi, > > > > I don't know if seding message to correct list. But after upgrade from > > FBSD 2.2.2 to FBSD 2.2.6-stable something moved. In my /etc/passwd file > > there are lots of coments "#" and getpwent() return 0 after read this > > line. I have some scripts in perl that stops when getpwent() return 0. > > In FBSD 2.2.2 when getpwent() returned 0 meant end of file /etc/passwd. > > I hope you realize that /etc/passwd isn't used for anything. All users > should be listed in /etc/master.passwd. You should used vipw to edit > /etc/master.passwd > > Tom > But I'm using vipw to edit this files. I would like to leave coments in /etc/master.passwd and /etc/passwd. In /etc/master.passwd edited with vipw: user1:(password):... user2:(password):... #user3:(password):... > this users stopped logins temporarily user4:(password):... when anyone executes: % finger user1 it work fine. and to user2 too, but when: % finger user4 it return no such user My problem are some scripts to verify users on system. I'm verifying using one loop like this: (perl) while (($account, $passwd, $uid, $gid, $quota, $comment, $gcos, $home, $shell) = getpwent()) { } this finsh when getpwent() return 0 this occur in frist comment in /etc/master.passwd not in end of file. If getpwent() returned 0 in comments "#" and -1 in EOF it solved. Are there any solution in this case? Many thanks, Paulo. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message