Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2016 19:56:52 +0000
From:      Glen Barber <gjb@FreeBSD.org>
To:        Russell Haley <russ.haley@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: FreeBSD user home directory
Message-ID:  <20160720195652.GE65494@FreeBSD.org>
In-Reply-To: <CABx9NuQr2h3iG%2BwSBObr4ap2RZLGt1zBRPWKXwy8RU3%2BASjAwg@mail.gmail.com>
References:  <CABx9NuQr2h3iG%2BwSBObr4ap2RZLGt1zBRPWKXwy8RU3%2BASjAwg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Y46ssxGX9/CNNfN6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 20, 2016 at 01:45:47PM -0600, Russell Haley wrote:
>  Hi guys,
>=20
> Note: auto-correct on this computer is setting freebsd to FreeBSD.
> Please assume lowercase where appropriate if I don't catch them all.
>=20
> 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.
>=20
> The home directory for the FreeBSD user on the 10.2 cloud instance is
> in the expected location of /usr/home/freebsd.
>=20
> freebsd@do:~ % pwd
> /usr/home/freebsd
>=20
> However, the arm build puts the freebsd home directory is under /home/fre=
ebsd
>=20
> freebsd@imx6:~ % pwd
> /home/freebsd
>=20
> 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?vi=
ew=3Dmarkup:
>=20

No, this was not a mistake.  This is from the pw(8) manual:

-d dir        This option sets the account's home directory.  Normally,
              this is only used if the home directory is to be different
              from the default determined from /etc/pw.conf - normally
              /home with the account name as a subdirectory. =20

It's a matter of preference.  Some installs will create /home as
a symlink to /usr/home, some with /usr/home as a symlink to /home.

> 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}
>=20
> 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).
>=20

With the manual page quote above, I don't think there is any "wrong"
behavior here.

On your DigitalOcean machine, does /home exist?  If so, I suspect it is
a symlink.

Glen


--Y46ssxGX9/CNNfN6
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXj9eEAAoJEAMUWKVHj+KTVUsP/iujf9f/9pfayBLThh7ujl2G
1UjuTOIS3aiu4pzvJL7hCLq2dHfa0gJh81FnYBYFVm2Nzlow4qhh8he0IjRH1OTR
6VAV5cjqLprG4RbEAXBeSH+7tOY/vPIohWtzAAjwZhNlq+4K/eR8Yvgq/bC74xbS
Lh1G+sYqk99Hx7FRs7GymEhRr0756U1hcmtreb5GR7a58R4FdXwiyise4LsavDF6
SA6vzawIp0GgAVM3XwqE7Z+j13cW71iGKQA36Xc9gC61MEL52r3G/fK7P9x+A90A
Wd3P/RLuInU7SoB5PDnvtkNgHdP87YyYYIoqTncPehEaUf5RFJ/a6wqzR1HazbXU
s7njypIYL315YBDoG7/tOU6fBJkrp9+CV8aBKDNhaezdT8DF2Nt1rgN3zQi3ZQN6
Yc1I8i6W4rX1JadRW2MWI3P2OWyGBFoRnPMrF2OvoLvBUhh3xEZoMERRjj9SO36+
59f9ST69Lp6xD7wNkTDgj0lq4zH1NzqJit57b0QlC4q1/D553DMiicKvBYjTj0Dy
QYKzVmCF/ylOqbd1GGwDz0ZUxmSXo8oXLNrXUoI4gm1jBvB9l0llWoA307Oxiqlr
csSeATO0+dtK3HWKUrmLXVrruApvrF764rOMnEAPouimQekfofvNf/UAhcWazDui
BnPk1mX1+l+r1iBF4rwu
=Gjw/
-----END PGP SIGNATURE-----

--Y46ssxGX9/CNNfN6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160720195652.GE65494>