From owner-freebsd-ports@FreeBSD.ORG Sun Nov 10 20:06:19 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 424D2B57 for ; Sun, 10 Nov 2013 20:06:19 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7EC2E9C for ; Sun, 10 Nov 2013 20:06:19 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id y10so4276480pdj.38 for ; Sun, 10 Nov 2013 12:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KG6P1jm2lQGLqsMPoY3ANcr1B8ivw79zMSpLf9rysJM=; b=FZyGpC7iHtwR8JZ3RXk3PHebBFJZpJrepf021Kna/A9PpdoT0ULMZAwVWegAVoYS6y i7EItMsMVUVquAu2V+sLsWy0w9IjTHgfE9MJdaYts+x/TEhQquK0M7zuCpIsbckDUoX5 MQmqQ5yNnwuOflZrP/wRtKgVxZP2fk8kwYCzeDqC84q5NaT+N+cDP0FbxLtheGD3XAZ3 qTmLLUQ/BneHn2ZPZFP5/5x8AiQ0FGMF42xC54o5N3DeNWNEB0Ok2Dh7Ua7GSvmZFi8f JDAQwaDSFWiA6w1cftSW+o/l4aRFr3pf/JOn9jHi6Qek7I9bE19UD+SpLjGBgLl4I0mW Aoww== MIME-Version: 1.0 X-Received: by 10.68.143.196 with SMTP id sg4mr9258pbb.155.1384113978135; Sun, 10 Nov 2013 12:06:18 -0800 (PST) Received: by 10.68.185.130 with HTTP; Sun, 10 Nov 2013 12:06:18 -0800 (PST) In-Reply-To: <527FE5A9.1010002@gmx.de> References: <527FE5A9.1010002@gmx.de> Date: Sun, 10 Nov 2013 15:06:18 -0500 Message-ID: Subject: Re: Staging break user account modification in post-install From: Aryeh Friedman To: olli hauer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Ports 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: Sun, 10 Nov 2013 20:06:19 -0000 On Sun, Nov 10, 2013 at 2:59 PM, olli hauer wrote: > On 2013-11-10 20:40, Aryeh Friedman wrote: > > post-install is now called *BEFORE* users are created (before staging was > > added it was after)... looking at bsd.port.mk there seems no reasonable > > target that replaces post-install for this purpose. Namely I need to > lock > > the user account that was created and assign a default password to it. > > This is what I had that used to work: > > > > post-install: > > echo password|pw usermod user -h 0 2>/dev/null > > pw lock user > > Is the account always locked? > No it is locked/unlocked by a WebUI when ever the user needs to perform some task that is requires streaming stdio (i.e. the WebUI will say "To complete task X do the following in a terminal 'ssh user@localhost' and the WebUI will do what ever juggling is needed to make it so X is performed on the next login into user [including unlocking the account] when tsak X completes it locks the account [in reality we do it before] again). > If yes what is the difference to create a user without any password and > assigning '/usr/sbin/nologin' as shell? > > What happens to the account without staging if installed from a package? > Right now we are doing remote testing (different machine then the development one) via the port and thus have disabled pkg creation and thus need to do it before this.