From owner-freebsd-ports@FreeBSD.ORG Fri Sep 6 16:56:33 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C772B460 for ; Fri, 6 Sep 2013 16:56:33 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from yoshi.bluerosetech.com (yoshi.bluerosetech.com [174.136.100.66]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF2742F0B for ; Fri, 6 Sep 2013 16:56:33 +0000 (UTC) Received: from chombo.houseloki.net (c-76-27-220-79.hsd1.wa.comcast.net [76.27.220.79]) by yoshi.bluerosetech.com (Postfix) with ESMTPSA id 398C7E6040; Fri, 6 Sep 2013 09:56:27 -0700 (PDT) Received: from [IPv6:fc00:970::70be:f335:56cc:10bc] (unknown [IPv6:fc00:970::70be:f335:56cc:10bc]) by chombo.houseloki.net (Postfix) with ESMTPSA id C0076A23; Fri, 6 Sep 2013 09:55:55 -0700 (PDT) Message-ID: <522A091B.7080407@bluerosetech.com> Date: Fri, 06 Sep 2013 09:55:55 -0700 From: Darren Pilgrim User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Aryeh Friedman Subject: Re: setting the password of a automatically created account References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Ports ML X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 16:56:33 -0000 On 9/5/2013 6:52 PM, Aryeh Friedman wrote: > I have a port that needs to create a a user of a given name and a given > default password... I found in the porters guide how to make the account > but not set the password Because you must not do that. You can't even reliably do that. There are many cases where setting the password via any locally-available method will not work. Some examples: - The site uses LDAP, AD, etc. and the local system does not have the PAM configuration to feed back password changes; - Passwd, pw, etc. are disabled and users may only change their password at a secure portal; - Users may not change their passwords at all; - The system doesn't use user passwords at all. That last is common in in internet-facing servers, where login access is keys-only ssh and/or root-only console as a countermeasure against dictionary attacks. Your port can't detect these policies and can't work around them. The best you can do is include documentation stating what needs access above a login-disabled pseudouser.