mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
feat: Make Samba user configurable
This commit is contained in:
parent
aa575286f6
commit
ac3f4e2971
1 changed files with 4 additions and 2 deletions
|
|
@ -4,6 +4,8 @@ set -Eeuo pipefail
|
||||||
: "${SAMBA:="Y"}" # Enable Samba
|
: "${SAMBA:="Y"}" # Enable Samba
|
||||||
: "${SAMBA_LEVEL:="1"}" # Logging level
|
: "${SAMBA_LEVEL:="1"}" # Logging level
|
||||||
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
: "${SAMBA_DEBUG:="N"}" # Disable debug
|
||||||
|
: "${SAMBA_USER:="root"}" # Samba user
|
||||||
|
: "${SAMBA_GROUP:="root"}" # Samba group
|
||||||
|
|
||||||
tmp="/tmp/smb"
|
tmp="/tmp/smb"
|
||||||
rm -rf "$tmp"
|
rm -rf "$tmp"
|
||||||
|
|
@ -81,8 +83,8 @@ addShare() {
|
||||||
echo " writable = yes"
|
echo " writable = yes"
|
||||||
echo " guest ok = yes"
|
echo " guest ok = yes"
|
||||||
echo " guest only = yes"
|
echo " guest only = yes"
|
||||||
echo " force user = root"
|
echo " force user = $SAMBA_USER"
|
||||||
echo " force group = root"
|
echo " force group = $SAMBA_GROUP"
|
||||||
} >> "/etc/samba/smb.conf"
|
} >> "/etc/samba/smb.conf"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue