From owner-freebsd-questions Mon Jun 5 13:44: 8 2000 Delivered-To: freebsd-questions@freebsd.org Received: from vicosa.dpi.ufv.br (vicosa.dpi.ufv.br [200.17.74.1]) by hub.freebsd.org (Postfix) with ESMTP id 4424D37B74F for ; Mon, 5 Jun 2000 13:43:15 -0700 (PDT) (envelope-from kernel@tdnet.com.br) Received: from tdnet.com.br (port14.tdnet.com.br [200.236.148.114]) by vicosa.dpi.ufv.br (AIX4.2/UCB 8.7/8.7) with ESMTP id RAA21346 for ; Mon, 5 Jun 2000 17:42:32 -0200 (GRNLNDDT) Message-ID: <393C1126.C6586041@tdnet.com.br> Date: Mon, 05 Jun 2000 17:44:22 -0300 From: Gustavo Vieira Goncalves Coelho Rios Reply-To: grios@consultant.com X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: questions@freebsd.org Subject: validating users. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am writing a program that uses a file to authenticate its own users. This file format is (only de necessary fields) userid:type-of-account:passwd: How does is work? It's simple: When some one try to logg into our system, the software scans the user in such a file. There is two kinds of account: 1) sys (to be mapped into system account, /etc/passwd, NIS, etc) 2) lcl (the account is within the software, this type requires the third field to be used) for instance: grios:sys:: guest:lcl:$1$dfsfsdf$#2345##$: When user grios tries to get into the system it's password would be test against the system account. This means that there must be system account for grios, be in /etc/passwd or in NIS/NIS+. But the user guest have its account within the own software, what would not require a system passwd. I would like to know how can i implement such a authentication. Of course i know how to decide if an account is mapped or not to a system one (it's easy, just reading the file). My questions is: once i know it's an account mapped to system one, how to authenticate the income user? Thanks a lot for your time and cooperation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message