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
|
||||
|
||||
3
setup.sh
3
setup.sh
@@ -300,6 +300,9 @@ load_or_create_config() {
|
||||
create_interactive_config
|
||||
load_config # Load the new configuration
|
||||
fi
|
||||
|
||||
# Export configuration variables for use in subshells
|
||||
export ADMIN_USER SSH_PORT CONFIGURE_STATIC_IP INSTALL_DOCKER INSTALL_NFS INSTALL_NETDATA INSTALL_VAULTWARDEN INSTALL_JELLYFIN INSTALL_PORTAINER INSTALL_WEBMIN ENABLE_AUTO_UPDATES
|
||||
}
|
||||
|
||||
create_interactive_config() {
|
||||
|
||||
Reference in New Issue
Block a user