Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2016 13:45:47 -0600
From:      Russell Haley <russ.haley@gmail.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   FreeBSD user home directory
Message-ID:  <CABx9NuQr2h3iG%2BwSBObr4ap2RZLGt1zBRPWKXwy8RU3%2BASjAwg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuQr2h3iG%2BwSBObr4ap2RZLGt1zBRPWKXwy8RU3%2BASjAwg>