How to resolve Windows machine names from Ubuntu server

Problem:

I can’t resolve my Windows machine names on my Ubuntu Linux box.

Solution:

Install libnss-winbind and then update your /etc/nsswitch.conf file.
To install libnss-winbind run the following command: 
sudo apt-get install libnss-winbind

When asked “Do you want to continue? [Y/n]” type Y and press enter.

Now we have to update your /etc/nsswitch.conf file. We are going to use vim.

Type sudo vim /etc/nsswitch.conf
Type i (to enter insert mode)
Add “wins” to the “hosts:       files dns” line so that it is “hosts:      files dns wins”
Press Esc (to exit insert mode)
Type :wq (to save and quit)

Now ping your Windows machines by name.
Comments are closed