Files
darroyo 03e9368a91 feat: add invalid_users directive for Samba shares
Samba shares now support an 'invalid users' list (deny list), written
as 'invalid users = u1,u2' in smb.conf. The UI shows a ChipPicker
for valid_users and invalid_users, mutually exclusive, sourced from
the system user list.

feat: add ImportSystemUsers for fresh installations

When NASCTL_IMPORT_ON_BOOT=true, nasctl now imports existing system
users from /etc/passwd (UID 1000-60000) and /etc/group (supplemental
groups), and detects which have Samba accounts via 'pdbedit -L'.
Imported users are marked dirty so the admin can review before applying.
New POST /api/import/users endpoint for manual re-import.

This mirrors the existing import-on-boot flow for smb.conf and /etc/exports.
2026-07-06 15:37:01 -04:00

28 lines
606 B
Cheetah

# Generated by nasctl. Do not edit manually.
[global]
workgroup = WORKGROUP
server string = nasctl
security = user
map to guest = Bad User
dns proxy = no
{{range .Shares}}
[{{.Name}}]
path = {{.Path}}
comment = {{.Comment}}
browseable = yes
read only = {{if .ReadOnly}}yes{{else}}no{{end}}
guest ok = {{if .GuestOK}}yes{{else}}no{{end}}
{{- if .ValidUsers}}
valid users = {{join .ValidUsers ","}}
{{- end}}
{{- if .ValidGroups}}
valid groups = {{join .ValidGroups ","}}
{{- end}}
{{- if .InvalidUsers}}
invalid users = {{join .InvalidUsers ","}}
{{- end}}
{{end}}