NT_STATUS_BAD_NETWORK_NAME error

Richard Sharpe realrichardsharpe at gmail.com
Mon Sep 22 08:37:51 MDT 2014


On Mon, Sep 22, 2014 at 1:24 AM, Ata E Husain Bohra
<atahusain.b at gmail.com> wrote:
> Hi Richard,
>
> No, samba did not crash; I confirmed the smbd is running after issuing this
> command. From logs I get these logs:

What does smbstatus show?

There should be more than one smbd running. Most likely the master
smbd and one for printing if you have that enabled and one for each
client that is connected. smbstatus will show the connected clients.

The log portion you have shown looks like that for the master smbd not
for your client. Based on your smb.conf there should be a log for the
client in /var/log/samba called log.<client-netbios-or-IP>. That is
where I would expect to see a SIGSEGV. The error message suggests that
the connection dropped.


> "
> [2014/09/22 01:21:26.337619,  5, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap.c:187(dbwrap_check_lock_order)
>   check lock order 2 for /usr/local/samba/var/lock/serverid.tdb
> [2014/09/22 01:21:26.337722, 10, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap.c:133(debug_lock_order)
>   lock order:  1:<none> 2:/usr/local/samba/var/lock/serverid.tdb 3:<none>
> [2014/09/22 01:21:26.337777, 10, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap_tdb.c:59(db_tdb_log_key)
>   Locking key 7C62000000000000FFFF
> [2014/09/22 01:21:26.337838, 10, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap_tdb.c:143(db_tdb_fetch_locked_internal)
>   Allocated locked data 0x0x7f28081cfd00
> [2014/09/22 01:21:26.337910, 10, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap_tdb.c:59(db_tdb_log_key)
>   Unlocking key 7C62000000000000FFFF
> [2014/09/22 01:21:26.337958,  5, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap.c:146(dbwrap_lock_order_state_destructor)
>   release lock order 2 for /usr/local/samba/var/lock/serverid.tdb
> [2014/09/22 01:21:26.338000, 10, pid=24614, effective(0, 0), real(0, 0)]
> ../lib/dbwrap/dbwrap.c:133(debug_lock_order)
>   lock order:  1:<none> 2:<none> 3:<none>
> [2014/09/22 01:21:52.010722, 10, pid=24615, effective(0, 0), real(0, 0)]
> ../source3/lib/events.c:426(smbd_idle_event_handler)
>   smbd_idle_event_handler: idle_evt(print_queue_housekeeping) (nil) called
> [2014/09/22 01:21:52.010947,  5, pid=24615, effective(0, 0), real(0, 0)]
> ../source3/printing/queue_process.c:163(print_queue_housekeeping)
>   print queue housekeeping
> [2014/09/22 01:21:52.011026, 10, pid=24615, effective(0, 0), real(0, 0)]
> ../source3/lib/events.c:437(smbd_idle_event_handler)
>   smbd_idle_event_handler: idle_evt(print_queue_housekeeping) (nil)
> rescheduled
> [2014/09/22 01:21:52.137529,  2, pid=24614, effective(0, 0), real(0, 0)]
> ../source3/smbd/server.c:419(remove_child_pid)
>   Could not find child 25218 -- ignoring
>
> "
>
> On Sun, Sep 21, 2014 at 10:20 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>>
>> 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
>> (何以解憂?唯有杜康。--曹操)
>
>
>
>
> --
> Regards,
> Ata



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


More information about the samba-technical mailing list