From owner-freebsd-current@freebsd.org Mon Sep 12 13:35:09 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A1D6BD791E for ; Mon, 12 Sep 2016 13:35:09 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED49E6BE for ; Mon, 12 Sep 2016 13:35:08 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) for freebsd-current@freebsd.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1bjRNz-001GzU-Q0>; Mon, 12 Sep 2016 15:34:59 +0200 Received: from p578a69f9.dip0.t-ipconnect.de ([87.138.105.249] helo=freyja.zeit4.iv.bundesimmobilien.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) for freebsd-current@freebsd.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (envelope-from ) id <1bjRNz-001Ltn-JI>; Mon, 12 Sep 2016 15:34:59 +0200 Date: Mon, 12 Sep 2016 15:34:54 +0200 From: "O. Hartmann" To: freebsd-current Subject: PROBLEM: memory disk, autologin and pam_mkhomedir Message-ID: <20160912153454.485aa6a3@freyja.zeit4.iv.bundesimmobilien.de> Organization: FU Berlin X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: 87.138.105.249 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 13:35:09 -0000 Hello all. Running a small NanoBSD image that is supposed to provide only a one-user, single simple session utilizing Firefox, I run into problems. The setup targets a security sensitive issue, so the /home folder is created as a memory disk and of limited size via /etc/fstab. The user, called "autologin" for simple reasons, has the proper settings in /etc/gettytab: # # Autologin Terminal # Pc-auto|Pc autologin console:\ :tc=Pc:sp#230400:\ :al=autologin: and its settings in /etc/ttys meets this requirement by: ttyv1 "/usr/libexec/getty Pc-auto" xterm on secure So far. To make this user a real autologin user, I also added to /etc/pam.d/system the recommendation as of: # session session required /usr/local/lib/pam_mkhomedir.so \ mode=0750 session required pam_lastlog.so no_fail Obviously, this logix doesn't apply. The user "autologin" gets logged in to "/", on the console I have some error message saying [...] No home directory. Logging in with home = "/" The user is located in root's root. Typing "cd" at the carret puts then this user into /home/autolgin - as expected, but too late! I guess autologin logs in users way to early, or something is missing in the pam_mkhomedir config, but I can't find out what. I tried to check also login.conf(5) for suitable answeres, but none found. The operator :requirehome: in /etc/login.conf can not be used, since the creation of the home on loggin doesn't work as expected. Is this a bug or a feature? Is there a solution to this? Thank you very much in advance for your help, Kind regards, Oliver