Fix Samba user reference to use ADMIN_USER instead of NEW_USER
- Corrected setup_samba function to use ${ADMIN_USER:-$USER} consistently
- Export configuration variables in load_or_create_config for subshell access
- Ensure ADMIN_USER variable is properly available in all lib scripts
This commit is contained in:
@@ -316,7 +316,7 @@ EOF
|
||||
# Add Samba user
|
||||
local samba_password=$(ask_password "Set Samba password for user ${ADMIN_USER:-$USER}")
|
||||
echo -e "$samba_password\n$samba_password" | sudo smbpasswd -a "${ADMIN_USER:-$USER}"
|
||||
sudo smbpasswd -e "${ADMIN_USER:-$NEW_USER}"
|
||||
sudo smbpasswd -e "${ADMIN_USER:-$USER}"
|
||||
|
||||
# Start and enable Samba services
|
||||
sudo systemctl enable smbd nmbd
|
||||
|
||||
@@ -94,4 +94,4 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
# Falls direkt ausgeführt: versuchen wir die Funktion und geben das Ergebnis als Exit-Code zurück.
|
||||
install_vaultwarden "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user