Setting system user home directory

Miroslav Lachman 000.fbsd at quip.cz
Sat Dec 16 20:47:51 UTC 2017


Dmytro Bilokha wrote on 2017/12/16 21:10:
> On Sat, Dec 16, 2017 at 08:53:17PM +0200, Dmytro Bilokha wrote:
>> On Sat, Dec 16, 2017 at 10:48:34AM -0800, Kevin Oberman wrote:
>>> On Sat, Dec 16, 2017 at 9:04 AM, Dmytro Bilokha <dmytro at posteo.net>

[...]

>>> Kevin Oberman, Part time kid herder and retired Network Engineer
>>> E-mail: rkoberman at gmail.com
>>> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>>
>> I've add following lines to the port's makefile:
>> USERS=        payara
>> GROUPS=        payara
>>
>> And user is created automatically during port installation process.

> Guys, thanks for your help. I've managed to adjust user's homedir
> using pkg-install script. Now I'll try to move everything writable
> from /usr/local to /var (as Miroslav suggested), test and submit the new
> port version.

Ideally you should not silently change existing user account. There is 
possibility that user (sysadmin) made some tweaks (different UID, 
different home, shell etc.) and if your port will do some silent changes 
it can break some setup.
Better way is to use this setting only on newly created user (fresh pkg 
install) or print pkg-message with instruction (command) what should 
user do to have this setup corrected to new port properties.
Or maybe you can do this change interactively with user confirmation Y/N.
Maybe create UPDATING entry.

Just my $0.02

Miroslav Lachman


More information about the freebsd-ports mailing list