diff options
-rw-r--r-- | bin/ncp/NETWORKING/samba.sh | 10 | ||||
-rw-r--r-- | changelog.md | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/bin/ncp/NETWORKING/samba.sh b/bin/ncp/NETWORKING/samba.sh index c4fff3c3..6d33882c 100644 --- a/bin/ncp/NETWORKING/samba.sh +++ b/bin/ncp/NETWORKING/samba.sh @@ -64,10 +64,10 @@ EOF # create a share per Nextcloud user local USERS=() while read -r path; do - USERS+=( "$( basename $( dirname "$path" ) )" ) + USERS+=( "$( basename "$(dirname "$path")" )" ) done < <( ls -d "$DATADIR"/*/files ) - for user in ${USERS[@]}; do + for user in "${USERS[@]}"; do # Exclude users not matching group filter (if enabled) if [[ -n "$FILTER_BY_GROUP" ]] \ && [[ -z "$(ncc user:info "$user" --output=json | jq ".groups[] | select( . == \"${FILTER_BY_GROUP}\" )")" ]] @@ -98,10 +98,10 @@ EOF ## create user with no login if it doesn't exist id "$user" &>/dev/null || adduser --disabled-password --force-badname --gecos "" "$user" || return 1 - echo -e "$PWD\n$PWD" | smbpasswd -s -a $user + echo -e "$PWD\n$PWD" | smbpasswd -s -a "${user}" - usermod -aG www-data $user - sudo chmod g+w $DIR + usermod -aG www-data "${user}" + sudo chmod g+w "${DIR}" done update-rc.d smbd defaults diff --git a/changelog.md b/changelog.md index bb8a6a76..75c33cc3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ -[v1.46.1](https://github.com/nextcloud/nextcloudpi/commit/6f3bfb1) (2022-03-02) nc-datadir: include dotfiles +[v1.46.2](https://github.com/nextcloud/nextcloudpi/commit/6f53314) (2022-03-02) samba: fix usernames with spaces + +[v1.46.1](https://github.com/nextcloud/nextcloudpi/commit/b4ef137) (2022-03-02) nc-datadir: include dotfiles [v1.46.0 ](https://github.com/nextcloud/nextcloudpi/commit/2b59e26) (2022-03-01) upgrade to NC23.0.2 |