init
This commit is contained in:
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# samba-configer
|
||||
|
||||
`samba-configer` is a small interactive terminal program for reading an existing Samba configuration, listing shares, and guiding add/edit/delete operations.
|
||||
|
||||
It is implemented in Go with only the standard library so it builds into a single executable easily.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
go build -o samba-configer .
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
./samba-configer -config /etc/samba/smb.conf
|
||||
```
|
||||
|
||||
The program:
|
||||
|
||||
- Reads the Samba config and parses non-`[global]` sections as shares.
|
||||
- Prompts to add, edit, or delete a share.
|
||||
- Checks `valid users` entries against local accounts.
|
||||
- Offers to create missing local accounts with `useradd -M -s /usr/sbin/nologin <user>`.
|
||||
- Writes a timestamped backup before saving changes.
|
||||
|
||||
If you create a local account for a Samba-authenticated share, you may still need to add the Samba password separately:
|
||||
|
||||
```bash
|
||||
smbpasswd -a <username>
|
||||
```
|
||||
Reference in New Issue
Block a user