diff options
Diffstat (limited to 'server/bin/setsmbpass')
-rwxr-xr-x | server/bin/setsmbpass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bin/setsmbpass b/server/bin/setsmbpass index 2162b3be..efd90eec 100755 --- a/server/bin/setsmbpass +++ b/server/bin/setsmbpass @@ -105,7 +105,7 @@ for OGLIVE in $LIST; do done if [[ $CHANGES != 0 ]]; then # Ticket 565, preparar acceso Rsync servidor. - echo "$SAMBAUSER:$SAMBAPASS" > /etc/rsyncd.secrets + [ -e /etc/rsyncd.secrets ] && sed -i -n -e "/^$SAMBAUSER:/!p" -e "$ a$SAMBAUSER:$SAMBAPASS" /etc/rsyncd.secrets || echo "$SAMBAUSER:$SAMBAPASS" > /etc/rsyncd.secrets chown root.root /etc/rsyncd.secrets chmod 600 /etc/rsyncd.secrets # Cambiar clave Samba. |