Passo faltando na configuração do compartilhamento de samba no Centos 6

0

Tenho problemas para configurar o compartilhamento de arquivos e impressoras em um servidor Centos (por meio do Samba). Rede e configuração geral são muito bem, como tanto o acesso ao gerenciamento da web copos e um site servido pelo Apache no mesmo servidor vai bem.

Então parece que o problema está no nível do samba.

Só para ter certeza de que não foi um problema de segurança, desativei o iptables e o SELinux - não muito importante, o servidor está em uma rede local com acesso limitado à Internet. Quero ter certeza de que a configuração básica funciona antes de adicionar medidas extras de segurança.

Os clientes são principalmente o Win7. Nenhum pode se conectar. Um comando "net view" emitido a partir das máquinas Windows não mostra nada sobre o servidor, embora eles possam se conectar aos sites hospedados lá.

Aqui está o meu 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

Aqui está um log de nível 3 do samba na inicialização:

[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

Eu normalmente sou um desenvolvedor, não um administrador, então posso estar perdendo algo óbvio aqui ... Algumas coisas nesse log de inicialização parecem suspeitas, mas não tenho certeza de como elas são críticas e como corrigi-las . Alguma dica de onde eu deveria estar?

    
por Silver Quettier 02.10.2011 / 12:44

1 resposta

0

Bem, bem, envergonhe-me.

Acontece que foi um problema do Windows: os grupos de trabalho não foram configurados corretamente - e todas as máquinas foram configuradas da mesma maneira.

Tudo está funcionando agora. Desculpe por desperdiçar seu tempo com uma pergunta boba. Conselhos para aqueles que seguem meus passos: verifique se o problema está realmente no servidor. : /

@grawity: Você me preocupou, mas parece que no CentOs 6 pelo menos, o serviço smb tem nmbd e smbd deamons nele. Estranhamente, não consigo ver um processo de nmbd em execução, mas parece que está funcionando bem. Vou aprovar seu comentário para me apontar na direção certa: namespaces:)

    
por 03.10.2011 / 23:57

Tags