From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 05:14:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18175106568F for ; Mon, 6 Oct 2008 05:14:50 +0000 (UTC) (envelope-from rambiusparkisanius@gmail.com) Received: from mail-gx0-f21.google.com (mail-gx0-f21.google.com [209.85.217.21]) by mx1.freebsd.org (Postfix) with ESMTP id CBBBB8FC29 for ; Mon, 6 Oct 2008 05:14:49 +0000 (UTC) (envelope-from rambiusparkisanius@gmail.com) Received: by gxk14 with SMTP id 14so4428459gxk.19 for ; Sun, 05 Oct 2008 22:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=IE1j+qmoZXw6vFvAXQ49CPtXkZuz7Y2mtQvjpYnNzig=; b=jEoIMYdPl60YUQfgFumEiS1ry7NqXb0j5ffZm07KZ1X2/bOIjVTvBmYBbvlO6/5ubB PU1aVulXxXtsy34WjTAYXg/vGE+GWYe/WGDVRf2MizY/uRpAG44WblZAXgms1iwWZ9t7 a590Cnn4wX8Sdq6LBGX06MHRQHGzl//O6ggwI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=nIrI1UbEpIryIp7v9+n7y7kqSjfgs0YhEtlfVGHDT7+3QWCKo+a/BLaEoEumnKjZ2r 8RedAPC2wpq+A8lVd6E+WwJJzzRwyjfMgup4QdUCV7NBlpCqYyXNACUMaDn8Eu5iFc46 bjoHq+Jk3+wJiuyhbee37OxnJLFCJS9C9CnXE= Received: by 10.90.33.5 with SMTP id g5mr5151976agg.64.1223270088705; Sun, 05 Oct 2008 22:14:48 -0700 (PDT) Received: by 10.90.33.18 with HTTP; Sun, 5 Oct 2008 22:14:48 -0700 (PDT) Message-ID: <89ce7f740810052214k4419d939s8bb8ebce5e703626@mail.gmail.com> Date: Mon, 6 Oct 2008 08:14:48 +0300 From: "Ivan \"Rambius\" Ivanov" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: How to generate password hashes for vipw and chpass X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 05:14:50 -0000 Hello, According to man pages of chpass(1) and vipw(1) I can create and modify users by supplying a user database entry in passwd(5) format. The only problem I face is that I do not know how to generate the password hashes for the password field. Following section 14.4 [http://www.freebsd.org/doc/en/books/handbook/crypt.html] from the handbook I found out that my system is using md5 to encrypt the passwords. I tried to use /sbin/md5 to generate the hash: # /sbin/md5 -s newpassword and then I passed the output to chpass. I tried to use the new password for the next login but it failed - so I believe this is wrong. Can you please show me how to generate the password hashes? Regards Rambius -- Tangra Mega Rock: http://www.radiotangra.com