Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have trouble setting up file and printer sharing on a Centos server (through Samba). Networking and general config are quite fine, as both accessing cups web management and a website served by Apache on the same server goes well.

So it seems the problem is on samba level.

Just to be sure it wasn't a security problem, I disabled iptables and SELinux - not too important anyway, the server is on a local network with limited access to the Internet. I want to be sure the basic config works before adding extra security measures.

Clients are mainly Win7. None can connect. A "net view" command issued from the windows machines show nothing about the server, although they can connect to the websites hosted there.

Here is my smb.conf:

[global]
        workgroup = WORKGROUP
        netbios name = kayak
        server string = Kayak
        log level = 3
        log file = /var/log/samba/log.%m
        max log size = 50
        password server = None
        encrypt passwords = no
        guest ok = yes
        security = user
        load printers = yes
        printing = cups
        printcap name = cups
[homes]
        comment = Home Directories
        writable = no
        browseable = no
[public]
        comment = Public dir
        path = /samba
        browseable = yes
        writable = yes
        Guest Ok = yes
        public = yes
[printers]
        path = /var/spool/samba/print
        printer = IBMInfoP
        browseable = yes
        public = Yes
        guest ok = Yes
        writable = No
        printable = yes
        use client driver = yes
        printer admin = @ntadmins

Here is a level 3 log from samba on startup:

[2011/10/02 12:27:31,  0] smbd/server.c:1119(main)
  smbd version 3.5.4-68.el6_0.2 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/10/02 12:27:31.240941,  2] lib/tallocmsg.c:106(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2011/10/02 12:27:31.241018,  2] lib/dmallocmsg.c:77(register_dmalloc_msgs)
  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2011/10/02 12:27:31.241107,  3] param/loadparm.c:9167(lp_load_ex)
  lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
[2011/10/02 12:27:31.241278,  3] ../lib/util/params.c:550(pm_process)
  params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
[2011/10/02 12:27:31.241365,  3] param/loadparm.c:7851(do_section)
  Processing section "[global]"
[2011/10/02 12:27:31.241493,  2] param/loadparm.c:7868(do_section)
  Processing section "[homes]"
[2011/10/02 12:27:31.241634,  2] param/loadparm.c:7868(do_section)
  Processing section "[public]"
[2011/10/02 12:27:31.241768,  2] param/loadparm.c:7868(do_section)
  Processing section "[printers]"
[2011/10/02 12:27:31.241933,  1] param/loadparm.c:7614(lp_do_parameter)
  WARNING: The "printer admin" option is deprecated
[2011/10/02 12:27:31.242056,  3] param/loadparm.c:6316(lp_add_ipc)
  adding IPC service
[2011/10/02 12:27:31.242230,  3] printing/pcap.c:136(pcap_cache_reload)
  reloading printcap cache
[2011/10/02 12:27:31.247490,  3] printing/pcap.c:243(pcap_cache_reload)
  reload status: ok
[2011/10/02 12:27:31.247630,  3] param/loadparm.c:6355(lp_add_printer)
  adding printer service HP_PSC_1500_series
[2011/10/02 12:27:31.247846,  2] lib/interface.c:340(add_interface)
  added interface eth1 ip=192.168.0.3 bcast=192.168.0.255 netmask=255.255.255.0
[2011/10/02 12:27:31.248031,  3] smbd/server.c:1161(main)
  loaded services
[2011/10/02 12:27:31.248097,  3] smbd/server.c:1176(main)
  Becoming a daemon.
[2011/10/02 12:27:31.250725,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.250785,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.250815,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.250900,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 2
[2011/10/02 12:27:31.250932,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 1
[2011/10/02 12:27:31.251207,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 2
[2011/10/02 12:27:31.251305,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.251344,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.251400,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.251427,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.251452,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.251824,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.251906,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.251939,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.251964,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252065,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252098,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252138,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252163,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252201,  3] auth/token_util.c:436(create_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2011/10/02 12:27:31.252237,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252289,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252315,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252336,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252409,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252437,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252461,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252483,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252517,  3] auth/token_util.c:467(create_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2011/10/02 12:27:31.252568,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252597,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252623,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252647,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.252887,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.252978,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-22-1-0]
[2011/10/02 12:27:31.253032,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-5-2]
[2011/10/02 12:27:31.253067,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-5-11]
[2011/10/02 12:27:31.256352,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.256395,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.256421,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.256541,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.256749,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.256786,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.256812,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.256879,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.256942,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.256971,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257011,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257101,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257155,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257181,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257205,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257243,  3] auth/token_util.c:436(create_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2011/10/02 12:27:31.257274,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257326,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257351,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257372,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257441,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257469,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257494,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257518,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257576,  3] auth/token_util.c:467(create_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2011/10/02 12:27:31.257613,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257641,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257666,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257690,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.257937,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.257980,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-5-21-3050736844-1377071369-2217750771-501]
[2011/10/02 12:27:31.258017,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-22-2-99]
[2011/10/02 12:27:31.258055,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-5-2]
[2011/10/02 12:27:31.258088,  3] lib/privileges.c:63(get_privileges)
  get_privileges: No privileges assigned to SID [S-1-5-32-546]
[2011/10/02 12:27:31.258191,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258224,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258241,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258281,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258307,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258320,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258332,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258369,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258397,  3] smbd/sec_ctx.c:210(push_sec_ctx)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258422,  3] smbd/uid.c:429(push_conn_ctx)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258436,  3] smbd/sec_ctx.c:310(set_sec_ctx)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2011/10/02 12:27:31.258477,  3] smbd/sec_ctx.c:418(pop_sec_ctx)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/02 12:27:31.258535,  3] printing/printing.c:1412(start_background_queue)
  start_background_queue: Starting background LPQ thread
[2011/10/02 12:27:31.258750,  3] ../lib/util/util_net.c:68(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name :: [Address family for hostname not supported]
[2011/10/02 12:27:31.258891,  3] ../lib/util/util_net.c:68(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name :: [Address family for hostname not supported]
[2011/10/02 12:27:31.259145,  2] smbd/server.c:721(smbd_parent_loop)
  waiting for connections

I'm normally a developer, not an admin, so I could be missing something obvious here... Some things in that startup log seems fishy but I'm not sure of how critical they are, and how to fix them. Any hints on where I should look ?

share|improve this question
1  
Is nmbd running? Can Windows access \\servername directly? Why are you using encrypt passwords = no? –  grawity Oct 2 '11 at 11:34
    
I am not sure. ps -ef |grep mbd only returns smbd - But isn't nmbd daemon a part of the samba service too ? Windows machines can't find CentOS server by name - I generally do everything by IP. Could it be the root of my problem ? –  Silver Quettier Oct 2 '11 at 16:47
    
It is part of the package, but runs as a separate daemon. nmbd handles NetBIOS "computer browsing", including name resolution, while smbd handles the SMB connections. –  grawity Oct 2 '11 at 18:58

1 Answer 1

up vote 0 down vote accepted

Well, well, shame on me.

Turns out it was a Windows problem : workgroups were not set up properly - and all machines were set up the same way.

Everything is working now. Sorry for wasting your time with a silly question. Advice for those following my footsteps: check if the problem is really on the server. :/

@grawity: You had me worried, but it looks like on CentOs 6 at least, the smb service has both nmbd and smbd deamons in it. Strangely, I can't see a nmbd process running, but it looks like it's working just fine. I'll upvote your comment for pointing me in the right direction: namespaces :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.