From owner-freebsd-hackers Thu May 18 17:26:26 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from camel.ethereal.net (camel.ethereal.net [216.200.22.209]) by hub.freebsd.org (Postfix) with ESMTP id B8BB137B9FF for ; Thu, 18 May 2000 17:26:23 -0700 (PDT) (envelope-from jkb@camel.ethereal.net) Received: (from jkb@localhost) by camel.ethereal.net (8.10.0.Beta10/8.10.0.Beta10) id e4J0PRZ07488; Thu, 18 May 2000 17:25:27 -0700 (PDT) Date: Thu, 18 May 2000 17:25:27 -0700 From: Jan Koum To: "Chris D. Faulhaber" Cc: "Daniel C. Sobral" , Dylan parker , freebsd-hackers@FreeBSD.ORG Subject: Re: i have 4 pwd.db Message-ID: <20000518172527.J10836@ethereal.net> References: <3923CA91.F7761CED@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.14i In-Reply-To: ; from jedgar@fxp.org on Thu, May 18, 2000 at 08:46:35AM -0400 X-Operating-System: FreeBSD camel.ethereal.net 3.4-RELEASE FreeBSD 3.4-RELEASE X-Unix-Uptime: 6:15PM up 8 days, 4:52, 25 users, load averages: 0.02, 0.10, 0.13 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, May 18, 2000 at 08:46:35AM -0400, "Chris D. Faulhaber" wrote: > On Thu, 18 May 2000, Daniel C. Sobral wrote: > > Dylan parker wrote: > > > > > > I want desencrypt the files pwd.db Help me please > > > > Password files are not decryptable by design. > > > > And encrypted passwords are not stored in pwd.db (see spwd.db) > And the hash itself is of course possible to recover from spwd.db: $ cat c.c #include #include #include #include struct passwd *pw; int main() { while (pw = getpwent()) { printf("%s:%s:%d:%d:%d:%d:%s:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, (int)pw->pw_change, (int)pw->pw_expire, pw->pw_class, pw->pw_gecos, pw->pw_dir, pw->pw_shell); } } $ make c $ sudo ./c -- yan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message