У меня проблемы с настройкой общего доступа к файлам и принтерам на сервере Centos (через Samba). Сеть и общие настройки довольно хороши, так как доступ к веб-управлению чашками и веб-сайту, обслуживаемому Apache на одном и том же сервере, идет хорошо.

Так что, похоже, проблема на уровне самбы.

Просто чтобы убедиться, что это не проблема безопасности, я отключил iptables и SELinux - в любом случае, это не слишком важно, сервер находится в локальной сети с ограниченным доступом к Интернету. Я хочу убедиться, что базовый конфиг работает, прежде чем добавлять дополнительные меры безопасности.

Клиенты в основном Win7. Никто не может подключиться. Команда "net view", запущенная с компьютеров Windows, ничего не показывает о сервере, хотя они могут подключаться к веб-сайтам, размещенным там.

Вот мой 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

Вот журнал уровня 3 от samba при запуске:

[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

Я обычно разработчик, а не администратор, поэтому я мог упустить что-то очевидное здесь ... Некоторые вещи в этом журнале запуска кажутся подозрительными, но я не уверен, насколько они критичны и как их исправить. Любые намеки на то, где я должен смотреть?

1 ответ1

0

Ну, ну, позор мне.

Оказывается, это была проблема Windows: рабочие группы не были настроены должным образом - и все машины были настроены одинаково.

Все работает сейчас. Извините, что потратил ваше время на глупый вопрос. Совет для тех, кто следует по моим стопам: проверьте, действительно ли проблема на сервере. :/

@grawity: Вы меня взволновали, но, похоже, на CentOs 6, по крайней мере, в сервисе smb есть как nmbd, так и smbd deamons. Странно, я не вижу работающего процесса nmbd, но похоже, что он работает просто отлично. Я добавлю ваш комментарий, чтобы он указывал мне правильное направление: пространства имен :)

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .