From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 06:18:02 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 CD7801065688 for ; Mon, 6 Oct 2008 06:18:02 +0000 (UTC) (envelope-from rambiusparkisanius@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 862628FC1A for ; Mon, 6 Oct 2008 06:18:02 +0000 (UTC) (envelope-from rambiusparkisanius@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so421737yxb.13 for ; Sun, 05 Oct 2008 23:18:01 -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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=K42e0WgpiTxltAYj0bMLUkgkjukESIEwZoDPx6FK35M=; b=OuGHymzpJ05vXaqnUJIq8sL9roAne3bhYZ/d21CmzHFx1UQzdeFGPKBTKr1xcsxPlU vnG94CUSsd/ZaE6H+0aDEgQuGuTH1KwjrBHUCip0VtpabsO+GUV6LtpDV+jVnDlqtTqN ILBTGk034jrH9g9lTE6DpgiqKifUeqqe7GH7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=x7uhvHdu3COk9pf0yqVjlSCWqX2Sy7BSkGf2equJRrutZZvvKy4FXYFNKWtIQYPYu8 pIgMedvZNQbtQiPx3J98wGXRaj8oqZfxnIvQS4tQRtQKbt7nKzMhfXthGSvPKDwfP13l ePUF+NFtGjGw8x3+UJOCtKw7j6gFoGUoLpP3s= Received: by 10.90.104.20 with SMTP id b20mr5207144agc.63.1223273881017; Sun, 05 Oct 2008 23:18:01 -0700 (PDT) Received: by 10.90.33.18 with HTTP; Sun, 5 Oct 2008 23:18:00 -0700 (PDT) Message-ID: <89ce7f740810052318u6bf50560h8c79549f25ece641@mail.gmail.com> Date: Mon, 6 Oct 2008 09:18:00 +0300 From: "Ivan \"Rambius\" Ivanov" To: "Adam Zaleski" In-Reply-To: <48E9A4D1.6020008@holon.urwis.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <89ce7f740810052214k4419d939s8bb8ebce5e703626@mail.gmail.com> <48E9A4D1.6020008@holon.urwis.cc> Cc: freebsd-questions@freebsd.org Subject: Re: 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 06:18:02 -0000 Hello Adam, On Mon, Oct 6, 2008 at 8:40 AM, Adam Zaleski wrote: > Ivan "Rambius" Ivanov pisze: > >> # /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? > > You can add new account with one command like this: > > echo user_password |pw user add new_user -h0 > > Also if you only want to generate valid password hash > you can use 'openssl passwd -1 new_password' Thank you, this is the command I was looking for. Regards Ivan -- Tangra Mega Rock: http://www.radiotangra.com