FreeBSD: zsh for created users as default shell

 

If we want to ensure that all users that will be created in the system by default as a shell, and zsh have a certain configuration, then do the following:

cat > /etc/adduser.conf
passwdtype=yes
homeprefix=/home
defaultshell=/usr/local/bin/zsh

Next, take your config for zsh and make it default for all:

cp ~/.zshrc /etc/zshrc

At creation of the new user there will be an invitation to configure zsh, but we do not need this:

cat > /usr/share/skel/dot.zshrc