How to create home directory for existing user?

Hi,

I installed the "zabbix-agent" but pkg created the user "zabbix" without a home directory and to allow zabbix monitoring my MadiaDB I need to add a ".my.cnf" with the MySQL credentials to that users home directory.

How can I create a home directory for an existing user?

Google is only showing me linux sites or links me to the FreeBSD "pw" manual.

I tried it with "pw usermod -n zabbix -m" but that doesn't create a directory.
 
Zabbix user doesn't have a home directory, it's explicitly set to /nonexistent.

Code:
# getent passwd zabbix
zabbix:*:122:122:Zabbix NMS:/nonexistent:/bin/sh

So, you would need to change that first. Then you can simply use mkdir(1) and chown(1) to create the directory itself.
 
Back
Top