Is there a way to perform additional tasks every time a new user is created with adduser(8) in FreeBSD?
To be more precise, i'd like to create a directory for every new user and map this user with pdbedit(8) to the SAM database.
Some Linux distributions like debian/ubuntu provide a handy way to solve this problem. If a script called
/usr/local/sbin/adduser.local exists, it'll be executed after a new user has been created:
#!/bin/bash mkdir /srv/samba/$1 chown $1:$2 /srv/samba/$1 chmod 775 /srv/samba/$1
How would I do this using FreeBSD?