Go interactive cli script to add a new user in FreeBSD, complete with zfs dataset and appropriate permissions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zico 6e14fdf66b added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago
README.md updating readme 3 days ago
addnewuser added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago
config.example.toml added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago
go.mod added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago
go.sum added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago
main.go added a toml config file, flag for config location, stopped echoing and printing password to output 1 day ago

README.md

FreeBSD-addnewuser


This is a interactive cli Go program to add a new user to FreeBSD. It assumes you already have a working zfs setup and want to create a new dataset for each new user. It uses zfs quotas to limit each user to a certain size.

The script now asks for a user password. If you intend to allow users to mount zfs datasets in their home directory without superuser permissions, you must set sysctl vfs.usermount=1.

This has not been tested extensively, so please do your own testing if you choose to rely on it for important stuff.