Add comprehensive user management functionality
Features added: - Create Samba users with password setup (user-create) - List all Samba users (user-list) - Delete Samba users with optional system user removal (user-delete) - Configure share access for users interactively (user-access) - Revoke user access from specific shares (user-revoke) - Automatically creates system users if needed - Interactive share selection for user permissions - Disables guest access when users are assigned User management includes: - Password prompts for new users - System user creation with no shell access - Integration with pdbedit for user management - Automatic valid_users configuration in smb.conf - Backup creation before any configuration changes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9c97169799
commit
74c2dd0daf
2 changed files with 290 additions and 2 deletions
33
README.md
33
README.md
|
|
@ -80,6 +80,39 @@ sudo ./spravuj_sdileni.sh delete <share-name>
|
|||
sudo ./spravuj_sdileni.sh auto-disks
|
||||
```
|
||||
|
||||
### User Management
|
||||
|
||||
**Create a new Samba user**:
|
||||
```bash
|
||||
sudo ./spravuj_sdileni.sh user-create [username]
|
||||
```
|
||||
This will:
|
||||
- Create a system user if it doesn't exist (with no shell access)
|
||||
- Prompt for a Samba password
|
||||
- Optionally configure which shares the user can access
|
||||
|
||||
**List all Samba users**:
|
||||
```bash
|
||||
sudo ./spravuj_sdileni.sh user-list
|
||||
```
|
||||
|
||||
**Configure share access for a user**:
|
||||
```bash
|
||||
sudo ./spravuj_sdileni.sh user-access [username]
|
||||
```
|
||||
Interactively select which shares the user can access.
|
||||
|
||||
**Revoke user access from a share**:
|
||||
```bash
|
||||
sudo ./spravuj_sdileni.sh user-revoke <username> <share-name>
|
||||
```
|
||||
|
||||
**Delete a Samba user**:
|
||||
```bash
|
||||
sudo ./spravuj_sdileni.sh user-delete [username]
|
||||
```
|
||||
Optionally removes the system user as well.
|
||||
|
||||
## Share Types
|
||||
|
||||
The script creates different types of shares:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue