From owner-freebsd-arm@freebsd.org Wed Jul 20 19:45:49 2016 Return-Path: Delivered-To: freebsd-arm@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 30425B9E8B1 for ; Wed, 20 Jul 2016 19:45:49 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE89D177C for ; Wed, 20 Jul 2016 19:45:48 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id s189so83512376vkh.1 for ; Wed, 20 Jul 2016 12:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=o07zeXSlzgan7FG8afjee/OniUt33f9K7DiIsYXOrLc=; b=jLJmq/PqhUtjtzlv4vbJGjyq7Ntq0qJnNTH5pjEwmAUM3UVR+2bTRPI8szQyicLrfJ BaWqPE++VnzM5I5zy0aFa1yskebL9xvJs4RtFG9eegrf8tf52jAF6wSGa8VrnXDG0YMn 7guNWls+jOzkzSVzs/E6GIvTos1h1avuGIb0YimnI+U5HPiTd1w/JZOw+WNGBKtpiBfV 06vkRoxAlGBvvw+K1oMH8LKGWp0XtJgf+BwsX9/EoQn/EsGLA9xtSD0yrHb/Z7h89IvY xDLC/bA+rl5ascPfEKB4Uu1Mr2uIphFeff/EtsaRvctKXT9sZVWXHeXtnnXO8kO9wVtL 2ERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=o07zeXSlzgan7FG8afjee/OniUt33f9K7DiIsYXOrLc=; b=Syr47QleRkPRIM3LU4mC1lX3anvVXrNqZigICpp5kuMp4R/V7ZJFCSnLjd5E6819ar HRI7gwqPTYKhK+WVGfXLXCFhWO5xNuqeR42EmGtOnJJ6x+ez+m1u4H/NE5A3c7ZRYJDz IEY9SjwIsSbkAeNmbECszY+wc8zZGNzck62vDPBT/3tWjaME5WqkLcpKtkQQH/cuLr+f cXhbxlXVO+6aihKgiD6boLh1Qr1rTjyCuYE7ECQTNdsAI5ic61zw/OOi9MnzH2PPfIEm cbYAlTAmDvk7/fBSblx1vm5oNk3lhZoFPmzVd+qnElhiQdURk6Vpk1RjT14Gg7cbbk32 8VFQ== X-Gm-Message-State: ALyK8tJr2KfsnpQwujkyRd6lZeG3MZkNfqV1WBK8AK1UbLi9XAR0Hvx/KDchD0+N26hKDuhGqqY1DTGD2RYjlA== X-Received: by 10.31.185.9 with SMTP id j9mr11587187vkf.144.1469043947924; Wed, 20 Jul 2016 12:45:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.54.75 with HTTP; Wed, 20 Jul 2016 12:45:47 -0700 (PDT) From: Russell Haley Date: Wed, 20 Jul 2016 13:45:47 -0600 Message-ID: Subject: FreeBSD user home directory To: freebsd-arm Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 19:45:49 -0000 Hi guys, Note: auto-correct on this computer is setting freebsd to FreeBSD. Please assume lowercase where appropriate if I don't catch them all. I've decided to be lazy and just use the default freebsd user with the stuff I'm doing right now. I have two separate instances running: 10.2 in a Digital Ocean instance and arm 11-ALPHA-6 on my Hummingboard. The home directory for the FreeBSD user on the 10.2 cloud instance is in the expected location of /usr/home/freebsd. freebsd@do:~ % pwd /usr/home/freebsd However, the arm build puts the freebsd home directory is under /home/freebsd freebsd@imx6:~ % pwd /home/freebsd Thanks to a previous conversation with Mikael I have found that the script /usr/src/release/tools/arm.subr calls function arm_create_user() which places the user under /home (like debian). Can someone indicate if this is a mistake (which I think it is) or on purpose. From http://svnweb.freebsd.org/base/stable/11/release/tools/arm.subr?view=markup: 79 arm_create_user() { 80 # Create a default user account 'freebsd' with the password 'freebsd', 81 # and set the default password for the 'root' user to 'root'. 82 chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ 83 groupadd freebsd -g 1001 84 chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home/freebsd 85 chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ 86 useradd freebsd \ 87 -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ 88 -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' 89 chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ 90 usermod root -w yes 91 92 return 0 93} Incidentally, I tried to look up the "correct location" by using man hier and neither instance indicates that a home folder even exists! I also believe this to be an oversight. Again, if it is, please let me know and I will attempt to create the correct problem report and hopefully at some point some patches (i'm not in my usual environment so doing stuff with src isn't convenient right now). Cheers! Russ