(In reply to comment #5)
> Set "smb ports = 139"
>
Yes that fixed the problem. But it seems like a hack, not a solution. Do you really think that blocking port 445 is the final solution. Actually, port 455 supposed to be the newer implementation of SMB protocol. Wouldn't I loose some functionality by blocking it?
I believe there is a bug in the samba code that prevents it from getting correct clients name. According to sniffs the name is in the packets. Samba just don't see it.
Please explain to me if you think that I am wrong. I am not familiar with how exactly Samba works internally, but have experience setting up company level network.

(In reply to comment #6)
> (In reply to comment #5)
> > Set "smb ports = 139"
> >
>
> Yes that fixed the problem. But it seems like a hack, not a solution. Do you
> really think that blocking port 445 is the final solution.
YYes I do. In fact, the useradd (and machine add) should use %u and
not %m. %m is the NetBIOS machine name and is only reliably available
when the client establishes a NetBIOS session (which it does not on port 445).

(In reply to comment #5)
> Set "smb ports = 139"
>
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Set "smb ports = 139"
> > >
> >
> > Yes that fixed the problem. But it seems like a hack, not a solution. Do you
> > really think that blocking port 445 is the final solution.
>
> YYes I do. In fact, the useradd (and machine add) should use %u and
> not %m. %m is the NetBIOS machine name and is only reliably available
> when the client establishes a NetBIOS session (which it does not on port 445).
>
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Set "smb ports = 139"
> > >
> >
> > Yes that fixed the problem. But it seems like a hack, not a solution. Do you
> > really think that blocking port 445 is the final solution.
>
> YYes I do. In fact, the useradd (and machine add) should use %u and
> not %m. %m is the NetBIOS machine name and is only reliably available
> when the client establishes a NetBIOS session (which it does not on port 445).
>
Thanks. Using %u instead of %m is definitely a better solution than blocking the port. Thanks for the explanation too.