I am getting the error NT_STATUS_BAD_NETWORK_NAME when I send the command echo "hello" | smbclient -M "hostname" from Ubuntu to Window. Dumb question, do I need to to configure smb.conf?
Maybe a silly question but are you sure your netbios client is running winpopup??? Because smbclient -M is aimed at sending messages to winpopup only AFAICT.
This is a pretty old protocol which has been abandonned after win95 IIRC... See Q137143 from MS Kb and man smbclient to make sure what you do is acheivable with the version of samba and windows you're using.