>так помочь трудно
>покажи smb.conf
в smb.conf уже убил любую защиту, которую только нашел. Осталось вот что:
-# Global parameters
-[global]
- client code page = 866
- workgroup = BAZA
- netbios name = FREEBSD
- server string = рТЙЧЕФ
- security = SHARE
- allow trusted domains = No
- null passwords = Yes
- root directory = /root
- passwd chat = lenmax
- passwd chat debug = Yes
- unix password sync = Yes
- log level = 100
- log file = /var/log/log.%m
- max log size = 50
- dns proxy = No
- hosts allow = 192.168.0.
-
-[homes]
- comment = Home Directories
- path = /root
- guest ok = Yes
-
-[printers]
- comment = All Printers
- path = /var/spool/samba
- printable = Yes
- browseable = No
-
-[root]
- comment = root RootDir
- path = /tmp
- read only = No
- guest ok = Yes
-
-[_admin_]
- comment = _admin_ RootDir
- path = /tmp
- read only = No
- guest ok = Yes
саму самбу запускаю даже с отладкой так:
-#!/bin/sh
-smbspool=/var/spool/samba
-pidfiledir=/var/run
-smbd=/usr/local/sbin/smbd
-nmbd=/usr/local/sbin/nmbd
-
-# start
-if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
- if [ -f $smbd ]; then
- if [ -d $smbspool ]; then
- rm -f $smbspool/*
- fi
- echo -n ' Samba'
- $smbd -D -d 10 -s /usr/local/etc/smb.conf
- $nmbd -D -d 10 -s /usr/local/etc/smb.conf
- fi
-
-# stop
-elif [ "x$1" = "xstop" ]; then
- kill `cat $pidfiledir/smbd.pid`
- kill `cat $pidfiledir/nmbd.pid`
-fi
в журнал выводит примерно следующее:
Дальше формируются какие-то имена
-lib/util_sid.c:string_to_sid(418) string_to_sid: converted SID S-1-5-21-2330645596-907546663-3573024504 ok
Потом определяется что нет запрета на соединение
-[2003/01/03 18:43:22, 3] lib/access.c:check_access(307) check_access: no hostnames in host allow/deny list.
-[2003/01/03 18:43:22, 2] lib/access.c:check_access(318) Allowed connection from (192.168.0.4)
пошла нулевая транзакция от FREEBSD к freebsd
-[2003/01/03 18:43:22, 3] smbd/process.c:process_smb(860 Transaction 0 of length 76
-[2003/01/03 18:43:22, 2] smbd/reply.c:reply_special(93) netbios connect: name1=192.168.0.4 name2=FREEBSD
-[2003/01/03 18:43:22, 2] smbd/reply.c:reply_special(112) netbios connect: local=192.168.0.4 remote=freebsd
дальше отрабатывает loadparm
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service homes
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service printers
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service root
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service slawa
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service _admin_
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service IPC$
-[2003/01/03 18:43:22, 5] param/loadparm.c:free_service(1767) free_service: Freeing service ADMIN$
-[2003/01/03 18:43:22, 3] param/loadparm.c:init_globals(1211) Initialising global parameters
теперь smdb формирует и пишет ответ - видимо какие он умеет поддерживать протоколы
-[2003/01/03 18:43:22, 5] smbd/reply.c:reply_special(154) init msg_type=0x81 msg_flags=0x0
-[2003/01/03 18:43:22, 3] smbd/process.c:process_smb(860) Transaction 1 of length 168
-smb_err=0
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1435) [000] 02 50 43 20 4E 45 54 57 4F 52 4B 20 50 52 4F 47 .PC NETW ORK PROG
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [010] 52 41 4D 20 31 2E 30 00 02 4D 49 43 52 4F 53 4F RAM 1.0. .MICROSO
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [020] 46 54 20 4E 45 54 57 4F 52 4B 53 20 31 2E 30 33 FT NETWO RKS 1.03
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [030] 00 02 4D 49 43 52 4F 53 4F 46 54 20 4E 45 54 57 ..MICROS OFT NETW
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [040] 4F 52 4B 53 20 33 2E 30 00 02 4C 41 4E 4D 41 4E ORKS 3.0 ..LANMAN
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [050] 31 2E 30 00 02 4C 4D 31 2E 32 58 30 30 32 00 02 1.0..LM1 .2X002..
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [060] 53 61 6D 62 61 00 02 4E 54 20 4C 41 4E 4D 41 4E Samba..N T LANMAN
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [070] 20 31 2E 30 00 02 4E 54 20 4C 4D 20 30 2E 31 32 1.0..NT LM 0.12
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1443) [080] 00 .
выбирается протокол
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [PC NETWORK PROGRAM 1.0]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [MICROSOFT NETWORKS 1.03]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [MICROSOFT NETWORKS 3.0]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [LANMAN1.0]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [LM1.2X002]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(349) Requested protocol [Samba]
-[2003/01/03 18:43:22, 3] smbd/negprot.c:reply_negprot(433) Selected protocol NT LANMAN 1.0
записывается какой-то пакет и начинается новая транзакция
-[2003/01/03 18:43:22, 10] lib/util.c:dump_data(1435) [000] 42 41 5A 41 00 BAZA.
-[2003/01/03 18:43:22, 6] lib/util_sock.c:write_socket(566) write_socket(13,78) wrote 78
-[2003/01/03 18:43:25, 3] smbd/process.c:process_smb(860) Transaction 2 of length 93
-smb_err=0
-[2003/01/03 18:43:25, 10] lib/util.c:dump_data(1435) [000] 6C 65 6E 6D 61 78 00 52 4F 4F 54 00 42 41 5A 41 lenmax.R OOT.BAZA
-[2003/01/03 18:43:25, 10] lib/util.c:dump_data(1443) [010] 00 55 6E 69 78 00 53 61 6D 62 61 00 .Unix.Sa mba.
и дальше все разваливается
-[2003/01/03 18:43:25, 3] smbd/process.c:switch_message(667) switch message SMBsesssetupX (pid 2900)
-[2003/01/03 18:43:25, 3] smbd/sec_ctx.c:set_sec_ctx(321) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
-[2003/01/03 18:43:25, 5] smbd/uid.c:unbecome_user(216) unbecome_user now uid=(0,0) gid=(0,0)
-[2003/01/03 18:43:25, 3] smbd/reply.c:reply_sesssetup_and_X(856) Domain=[BAZA] NativeOS=[Unix] NativeLanMan=[Samba]
-[2003/01/03 18:43:25, 3] smbd/reply.c:reply_sesssetup_and_X(866) sesssetupX:name=[ROOT]
-[2003/01/03 18:43:25, 2] smbd/reply.c:reply_sesssetup_and_X(980) Defaulting to Lanman password for root
-[2003/01/03 18:43:25, 4] passdb/pass_check.c:pass_check(721) pass_check: Checking (PAM) password for user root (l=6)
-[2003/01/03 18:43:25, 4] passdb/pampass.c:smb_pam_start(458) smb_pam_start: PAM: Init user: root
-[2003/01/03 18:43:25, 0] passdb/pampass.c:smb_pam_error_handler(73) smb_pam_error_handler: PAM: Init Failed : Critical error - immediate abort
-[2003/01/03 18:43:25, 1] smbd/reply.c:reply_sesssetup_and_X(995) Rejecting user 'root': authentication failed
-[2003/01/03 18:43:25, 3] smbd/error.c:error_packet(99) error string = Bad file descriptor
-[2003/01/03 18:43:25, 3] smbd/error.c:error_packet(112) error packet at smbd/reply.c(997) cmd=115 (SMBsesssetupX) eclass=2 ecode=2
-smb_err=2
-[2003/01/03 18:43:25, 6] lib/util_sock.c:write_socket(566) write_socket(13,39) wrote 39
-[2003/01/03 18:43:25, 2] smbd/server.c:exit_server(458) Closing connections