I'm trying to connect to a Windows network/printer and Ubuntu keeps asking for a username and password authentication. The problem is that the Windows network doesn't have any password authentication enabled. Before upgrading to 16.04 it's was working ok, without the need of password.
Aside from the usual, "You need to put a password on your fileshares" response I will offer the following reply. More to the point, however, more modern versions of windows are starting to enforce the need for having a password. This is a good thing.
Following may be a post that has your answer. https://serverfault.com/questions/630631/how-to-make-samba-share-to-not-ask-for-password
I was thrown off by your mention of the printer. My comments are about connecting to a fileshare.
After doing some research this issue appears to be fixed in samba version 4.3.9.
sudo apt-get update sudo apt-get upgrade
sudo apt-get dist-upgrade
This should resolve your issue and allow you to click anonymous and remember forever choice.
If at 4.3.9, follow the guide on this website to mount Windows shares permanently.
Firstly, right click on your Windows 7 Computer icon and then select Properties. There, you shall find and right down your Computer's Name, e.g. «Alex-PC». That is the username that Ubuntu 16.04 is asking for.
Secondly, give as password your Ubuntu's 16.04 system password and voila, you are ready to go.
P.S.: Keep in mind that you must have disabled network need for password from your Windows 7 advanced network options.