Commit ce396f8f authored by MarvAmBass's avatar MarvAmBass

optional password sync

parent 512865cc
...@@ -27,6 +27,9 @@ to restrict access of volumes you can add the following to your samba volume con ...@@ -27,6 +27,9 @@ to restrict access of volumes you can add the following to your samba volume con
* __SAMBA\_CONF\_MAP_TO_GUEST__ * __SAMBA\_CONF\_MAP_TO_GUEST__
* default: _Bad User_ * default: _Bad User_
* __SAMBA\_CONF\_ENABLE\_PASSWORD\_SYNC__
* default not set - if set password sync is enabled
* __SAMBA\_VOLUME\_CONFIG\_myconfigname__ * __SAMBA\_VOLUME\_CONFIG\_myconfigname__
* adds a new samba volume configuration * adds a new samba volume configuration
* multiple variables/confgurations possible by adding unique configname to SAMBA_VOLUME_CONFIG_ * multiple variables/confgurations possible by adding unique configname to SAMBA_VOLUME_CONFIG_
......
...@@ -37,23 +37,33 @@ if [ ! -f "$INITALIZED" ]; then ...@@ -37,23 +37,33 @@ if [ ! -f "$INITALIZED" ]; then
## ##
cat > /etc/smb.conf <<EOF cat > /etc/smb.conf <<EOF
[global] [global]
server role = standalone server
workgroup = $SAMBA_CONF_WORKGROUP workgroup = $SAMBA_CONF_WORKGROUP
server string = $SAMBA_CONF_SERVER_STRING server string = $SAMBA_CONF_SERVER_STRING
server role = standalone server map to guest = $SAMBA_CONF_MAP_TO_GUEST
dns proxy = no dns proxy = no
log file = /dev/stdout log file = /dev/stdout
EOF
##
# SAMBA Configuration (Password Sync)
##
if [ ! -z ${SAMBA_CONF_ENABLE_PASSWORD_SYNC+x} ]
then
echo ">> SAMBA CONFIG: \$SAMBA_CONF_ENABLE_PASSWORD_SYNC is set, enabling password sync"
cat >> /etc/smb.conf <<EOF
unix password sync = yes unix password sync = yes
passwd program = /usr/bin/passwd %u passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes pam password change = yes
map to guest = $SAMBA_CONF_MAP_TO_GUEST
EOF EOF
fi
## ##
# USER ACCOUNTS # USER ACCOUNTS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment