LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   SAMBA fails to start after years of working normally and no changes (https://www.linuxquestions.org/questions/linux-server-73/samba-fails-to-start-after-years-of-working-normally-and-no-changes-639745/)

the_new_z 05-04-2008 02:54 AM

SAMBA fails to start after years of working normally and no changes
 
Hi guys,

I have been happily running a small Ubuntu Dapper home server for some time now. I use it mostly as a fileserver and for downloading torrents. The Windows machines connect to it through SAMBA, but a couple of days ago it just stopped working for no apparent reason.

Here is my smb.conf:

Code:

[global]
    ; General server settings
    netbios name = server
    server string = Samba Server
    workgroup = GITS
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
    interfaces = lo, eth1
    bind interfaces only = true

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    load printers = yes
    printing = cups
    printcap name = cups

    syslog = 1
    syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

[printers]
    comment = All Printers
    browseable = no
    path = /tmp
    printable = yes
    public = yes
    writable = no
    create mode = 0700
    printcap name = /etc/printcap
    print command = /usr/bin/lpr -P%p -r %s
    printing = cups

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes

[public]
    path = /fat
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = the_new_z
    force group = the_new_z

Here is the syslog when I try to start SAMBA:

Code:

May  4 10:40:22 server smbd[16435]: [2008/05/04 10:40:22, 0] param/loadparm.c:lp_do_parameter(3412)
May  4 10:40:22 server smbd[16435]:  Global parameter printcap name found in service section!
May  4 10:40:23 server smbd[16435]: [2008/05/04 10:40:23, 0] smbd/server.c:main(829)
May  4 10:40:23 server smbd[16435]:  ERROR: failed to setup guest info.

Maybe this is also important:

Code:

May  4 10:37:42 server nmbd[8954]: [2008/05/04 10:37:42, 0] nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(353)
May  4 10:37:42 server nmbd[8954]:  find_domain_master_name_query_fail:
May  4 10:37:42 server nmbd[8954]:  Unable to find the Domain Master Browser name GITS<1b> for the workgroup GITS.
May  4 10:37:42 server nmbd[8954]:  Unable to sync browse lists in this workgroup.

I am totally lost, so your help will be most appreciated. Let me know if you need any other output.

devcpu0 05-04-2008 05:31 AM

Stop samba and kill every process and try this:

nmbd -i -S -d 10
smbd -i -S -d 10

You need to run them as root, in two different consoles.
You will see a lot of output, maybe there you'll find an answer.

the_new_z 05-05-2008 01:44 AM

Thank you!

smbd -i -S -d 10 exits with:

Code:

User nobody in passdb, but getpwnam() fails!
attempting to free (and zero) a server_info structure
ERROR: failed to setup guest info.
talloc report on 'null_context' (total 959 bytes in 76 blocks)
        pdb_context internal allocation context contains    558 bytes in  7 blocks
        lp_talloc                      contains    401 bytes in  68 blocks

nmbd -i -S -d 10 goes for a long time, but I don't really get what it's saying. I see no errors, though. Here is a sample:

Code:

find_workgroup_on_subnet: workgroup search for GITS on subnet UNICAST_SUBNET: found.
find_workgroup_on_subnet: workgroup search for GITS on subnet UNICAST_SUBNET: found.
find_workgroup_on_subnet: workgroup search for GITS on subnet 192.168.0.1: found.
announce_myself_to_domain_master_browser: t (1209969661) - last(1209969307) < 900
dump_workgroups()
 dump workgroup on subnet    192.168.0.1: netmask=  255.255.255.0:
        GITS(1) current master browser = EXPERIENCE
                SERVER 40019a03 (Samba Server)
                EXPERIENCE 40051203 ()
dump_workgroups()
 dump workgroup on subnet  UNICAST_SUBNET: netmask=    192.168.0.1:
        GITS(1) current master browser = UNKNOWN
                SERVER 40019a03 (Samba Server)

Any further suggestions?

devcpu0 05-05-2008 12:58 PM

No prob! :)
It seems that samba is missing nobody's password.
Check if exist nobody in passwd:

Code:

grep nobody /etc/passwd
You have to see an output like mine:

Code:

nobody:x:65534:65534:nobody:/:/bin/false
Check also smb.conf for the guest account:

Code:

grep 'guest account' /etc/samba/smb.conf
It must match the user account found in passwd.

the_new_z 05-06-2008 01:02 AM

No, there seems to be no 'nobody' account. However, I created it with smbpasswd and I still get the same error.

devcpu0 05-06-2008 05:33 AM

Quote:

Originally Posted by the_new_z (Post 3144183)
No, there seems to be no 'nobody' account. However, I created it with smbpasswd and I still get the same error.

You have to create a "real" nobody account with useradd or something similar.

Code:

useradd -u 65535 -s /bin/false nobody

the_new_z 05-21-2008 10:38 AM

Excuse me for being so rude and not posting any answer for so long, but I have been away in the last couple of weeks. I will try your suggestion later today. What does the 65535 in useradd stand for?

the_new_z 06-02-2008 05:00 PM

Thank you. This totally worked, although I have no idea why... Thus far it was working without the nobody user!?


All times are GMT -5. The time now is 03:46 AM.