From owner-freebsd-questions Fri Sep 11 13:16:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA01140 for freebsd-questions-outgoing; Fri, 11 Sep 1998 13:16:11 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA01059 for ; Fri, 11 Sep 1998 13:15:59 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from ben by scientia.demon.co.uk with local (Exim 2.02 #1) id 0zHX4t-0000yX-00; Fri, 11 Sep 1998 18:33:47 +0100 Date: Fri, 11 Sep 1998 18:33:47 +0100 From: Ben Smithurst To: Roman Katsnelson , "q's" Subject: Re: manual password encryption Message-ID: <19980911183347.C2586@scientia.demon.co.uk> References: <35F93AC5.479E89D5@graphnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <35F93AC5.479E89D5@graphnet.com> User-Agent: Mutt/0.94.3i (FreeBSD 3.0-CURRENT i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Roman Katsnelson wrote: > I wanna match this to: > > grep -e "$name" /etc/passwd | cut -d":" -f1 # will yield user name > grep -e "$name" /etc/passwd | cut -d":" -f2 # will yield password > > can I manually encrypt the value of $pwd in the above example so that it > matches the grep | cut output? It uses crypt(), I beleive, but I know bugger all about that. Read the perl ``adduser'' script, that may give you some clues as to how to acheive it. -- Ben Smithurst : ben@scientia.demon.co.uk : http://www.scientia.demon.co.uk/ PGP: 0x99392F7D - 3D 89 87 42 CE CA 93 4C 68 32 0E D5 36 05 3D 16 http://www.scientia.demon.co.uk/ben/pgp-key.html (or use keyservers) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message