NT_STATUS_BAD_NETWORK_NAME error

Ata E Husain Bohra atahusain.b at gmail.com
Sun Sep 21 22:59:35 MDT 2014


Hi All,

I'm new to samba development; with the current assignment I want to trap
SAMBA calls by introducing a custom VFS module and pass it to a custom
library.

I've followed "Writing VFS module" by Richard and implemented a skeleton
vfs module. I hooked the module to the build process and can observe my
module getting compiled. For initial setup, I installed samba on a Centos
6.4 VM and exported a local directory (created under '/') as a share. I'm
using "smbclient" to access the share ( access URL is //localhost/<name of
share>), my smb.conf looks like:

"
[global]
        workgroup = CORP
        server string = Samba Server Version %v
        netbios name = <machine-name>

;       netbios name = MYSERVER

;       interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
        hosts allow = 127. 192.168.108.0/22 10.8.0.0/16

        # logs split per machine
        log file = /var/log/samba/log.%m
        log level = 10
        # max 50KB per log file, then rotate
        max log size = 50

        security = user
        map to guest = Bad Password
        passdb backend = tdbsam

        load printers = no
        cups options = raw

[sample]
vfs objects = test
comment = Public Stuff
path = /share
public = yes
writable = yes
browseable = yes
printable = no
"

If I do not use "vfs objects" line I am able to access the share with below
command:
" smbclient //localhost/sample -Uroot "

But when I try to enable it using my VFS module I get the following error:

"
> smbclient //localhost/sample -Uroot%Dobvus12
Domain=[CORP] OS=[Unix] Server=[Samba 4.1.12]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
"

My share is visible to smbclient:

"
> smbclient -L localhost

Domain=[CORP] OS=[Unix] Server=[Samba 4.1.12]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (Samba Server Version 4.1.12)
        *sample          Disk      Public Stuff
                                 (this is the share)*
Domain=[CORP] OS=[Unix] Server=[Samba 4.1.12]

        Server               Comment
        ---------            -------
        xxxx              Samba Server Version 4.1.12
        xxxx              Samba Server Version 4.1.12

        Workgroup            Master
        ---------            -------
        CORP                 xxx
"

My machine configuration is Centos 6.5 (final): 2.6.32-431.el6.x86_64

Access permission to /share is 0755 (drwxr-xr-x    4 root root  4096 Sep 21
17:24 *share*). Can anyone suggest what am I missing here?

Thanks,


More information about the samba-technical mailing list