macOS Sierra doesn't automatically mount a network drive, keeps asking for credentials

At the office we're using an Ubuntu server for filesharing amongst other things. After upgrading to macOS Sierra 10.12, the Finder app keeps asking for credentials when you try to connect to a network share:

With the latest 10.12.2 update, Apple fixed this with a preference you can set. According to Apple, this behavior can be adjusted using the Terminal:

To disable: sudo defaults write /Library/Preferences/com.apple.NetworkAuthorization AllowUnknownServers -bool YES

To enable it again: sudo defaults delete write /Library/Preferences/com.apple.NetworkAuthorization AllowUnknownServers