[47/54] samba: Automatically migrate role setting

Message ID 20201013160812.27754-47-michael.tremer@ipfire.org
State Accepted
Commit 33637fc0470aa431b8e802f7fe5d84fb2ed4610a
Headers show
Series [01/54] samba: Migrate configuration from Samba 3.6 to 4.x | expand

Commit Message

Michael Tremer Oct. 13, 2020, 4:08 p.m. UTC
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/paks/samba/install.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/src/paks/samba/install.sh b/src/paks/samba/install.sh
index 8b61298d5..22d74b93a 100644
--- a/src/paks/samba/install.sh
+++ b/src/paks/samba/install.sh
@@ -42,8 +42,12 @@  sed -i /var/ipfire/samba/smb.conf \
 	-e "/^syslog/d" \
 	-e "s/^security = share$/security = user/"
 
+# Migrate SECURITY to ROLE
 sed -i /var/ipfire/samba/settings \
-	-e "s/^SECURITY=share/SECURITY=user/"
+	-e "s/^SECURITY=ADS/ROLE=member/" \
+	-e "s/^SECURITY=server/ROLE=standalone/" \
+	-e "s/^SECURITY=share/ROLE=standalone/" \
+	-e "s/^SECURITY=user/ROLE=standalone/"
 
 # Start the service
 /usr/local/bin/sambactrl smbstart