mirror of
https://github.com/dockur/windows.git
synced 2025-10-14 20:12:22 +00:00
feat: Make Samba user configurable
This commit is contained in:
parent
aa575286f6
commit
ac3f4e2971
@ -4,6 +4,8 @@ set -Eeuo pipefail
|
||||
: "${SAMBA:="Y"}" # Enable Samba
|
||||
: "${SAMBA_LEVEL:="1"}" # Logging level
|
||||
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
||||
: "${SAMBA_USER:="root"}" # Samba user
|
||||
: "${SAMBA_GROUP:="root"}" # Samba group
|
||||
|
||||
tmp="/tmp/smb"
|
||||
rm -rf "$tmp"
|
||||
@ -81,8 +83,8 @@ addShare() {
|
||||
echo " writable = yes"
|
||||
echo " guest ok = yes"
|
||||
echo " guest only = yes"
|
||||
echo " force user = root"
|
||||
echo " force group = root"
|
||||
echo " force user = $SAMBA_USER"
|
||||
echo " force group = $SAMBA_GROUP"
|
||||
} >> "/etc/samba/smb.conf"
|
||||
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user