NT_STATUS_BAD_NETWORK_NAME error

Richard Sharpe realrichardsharpe at gmail.com
Sun Sep 21 23:20:48 MDT 2014


On Sun, Sep 21, 2014 at 9:59 PM, Ata E Husain Bohra
<atahusain.b at gmail.com> wrote:
> 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.

Most likely your vfs module is crashing Samba. Do you see any messages
about SEG Faults in /path/to/log.client name?

Also, you can do the following. Add 'panic action = "/bin/sleep
99999"' to the smb.conf and then when you see the problem see if there
is a process with sleep 99999 there.

Also, since you have a level 10 log for the client, what does it show.
Do you have any debug statements in your vfs module functions so you
can be sure you are making it into those functions?

> 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,



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list