I am trying to get BackupPC working with automount as documented in this CentOS HowTo: http://wiki.centos.org/HowTos/BackupPC I think my CentOS6 box's NetBIOS name resolving is not working correctly as when I try to access the mount for Win7 machine called Parallels I get this: [root at au ~]# ls /windows ls: cannot access /windows/parallels: No such file or directory parallels [root at au ~]# cd /windows/parallels -bash: cd: /windows/parallels: No such file or directory and I cannot ping the Win7 machine with its NetBIOS name: [root at au ~]# ping parallels ping: unknown host parallels If I add "wins" at the end of the hosts section in /etc/nsswitch.conf the resolver seems to get "stuck" as after ping it just hangs (there is no output, I have to quit it with CTRL+C) smbclient seems to work though: [root at au ~]# smbclient -L parallels -U Administrator Enter Administrator's password: Domain=[PARALLELS] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1] Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC test Disk Domain=[PARALLELS] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1] Server Comment --------- ------- Workgroup Master --------- ------- Why does the "wins" option not work in nsswitch.conf? What should I do to get automount working with CentOS + Win7 shares? Regards, Peter
On Sun, Jun 3, 2012 at 1:50 PM, Peter Peltonen <peter.peltonen at gmail.com>wrote:> > If I add "wins" at the end of the hosts section in /etc/nsswitch.conf > the resolver seems to get "stuck" as after ping it just hangs (there > is no output, I have to quit it with CTRL+C) > >Works on my network, my nsswitch.conf looks like this: hosts: files [!NOTFOUND=return] wins [!NOTFOUND=return] dns I seem to recall that the [!NOTFOUND=return], which is confusing as a double negative, keeps things like ping from hanging by causing an immediate return once a resolution is found. Order is important, so the above looks in the local files (/etc/hosts), then WINS and finally DNS, if you change the order, you may get different results. Brett
On Mon, Jun 4, 2012 at 5:50 AM, Peter Peltonen <peter.peltonen at gmail.com> wrote:> I am trying to get BackupPC working with automount as documented in > this CentOS HowTo: > http://wiki.centos.org/HowTos/BackupPC > > I think my CentOS6 box's NetBIOS name resolving is not working > correctly as when I try to access the mount for Win7 machine called > Parallels I get this: > [root at au ~]# ls /windows > ls: cannot access /windows/parallels: No such file or directory > parallels > [root at au ~]# cd /windows/parallels > -bash: cd: /windows/parallels: No such file or directory > > and I cannot ping the Win7 machine with its NetBIOS name: > > [root at au ~]# ping parallels > ping: unknown host parallels > > If I add "wins" at the end of the hosts section in /etc/nsswitch.conf > the resolver seems to get "stuck" as after ping it just hangs (there > is no output, I have to quit it with CTRL+C) > > smbclient seems to work though: > > [root at au ~]# smbclient -L parallels -U Administrator > Enter Administrator's password: > Domain=[PARALLELS] OS=[Windows 7 Professional 7601 Service Pack 1] > Server=[Windows 7 Professional 6.1] > > ? ? ? ?Sharename ? ? ? Type ? ? ?Comment > ? ? ? ?--------- ? ? ? ---- ? ? ?------- > ? ? ? ?ADMIN$ ? ? ? ? ?Disk ? ? ?Remote Admin > ? ? ? ?C$ ? ? ? ? ? ? ?Disk ? ? ?Default share > ? ? ? ?IPC$ ? ? ? ? ? ?IPC ? ? ? Remote IPC > ? ? ? ?test ? ? ? ? ? ?Disk > Domain=[PARALLELS] OS=[Windows 7 Professional 7601 Service Pack 1] > Server=[Windows 7 Professional 6.1] > > ? ? ? ?Server ? ? ? ? ? ? ? Comment > ? ? ? ?--------- ? ? ? ? ? ?------- > > ? ? ? ?Workgroup ? ? ? ? ? ?Master > ? ? ? ?--------- ? ? ? ? ? ?------- > > Why does the "wins" option not work in nsswitch.conf? > > What should I do to get automount working with CentOS + Win7 shares? >You don't give enough information. For instance, use the the 'mount' command to show the mount for the share. Secondly the message indicates that the file or directory cannot be found, not that name resolution is not happening. Thirdly, ping uses DNS not netbios by default so it is not able to find a DNS entry for 'parallels'. Please show the DNS entry for 'parallels' and the resolv.conf contents. Finally, a 'hang' usually indicates a lookup issue. What are the details for the wins server? Cheers, Cliff