Date: Fri, 10 Jul 1998 17:45:37 -0300 (EST) From: Paulo Fragoso <paulo@nlink.com.br> To: Tom <tom@uniserve.com> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Finger and getpwent Message-ID: <Pine.BSF.3.96.980710170655.1013A-100000@mirage.nlink.com.br> In-Reply-To: <Pine.BSF.3.96.980710122412.2887A-100000@shell.uniserve.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980710170655.1013A-100000>