Posted by 구차니
제목이 조금 낚시인가?
윈도우에서 net view 라고 명령창에서 치면 현재 사용가능한 네트워크 목록이 나오는데
특정 호스트를 nbtstat -a [hostname] 으로 하면 목록이 나오는데,
거기에 <1D> 라는 녀석이 있는게 (로컬) 마스터 브라우저이다.

C:\>nbtstat -a localhost

로컬 영역 연결:
Node IpAddress: [192.168.10.96] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    ---------------------------------------------
    LOCALHOST      <00>  UNIQUE      Registered
    LOCALHOST      <03>  UNIQUE      Registered
    LOCALHOST      <20>  UNIQUE      Registered
    WORKGROUP      <1E>  GROUP       Registered
    WORKGROUP      <00>  GROUP       Registered

    MAC Address = 00-00-00-00-00-00


workgroup
or
nt_domain
<1B> unique Domain Master Browser
This name identifies the Domain Master Browser (DMB).

A Samba server can behave as a DMB without also being a Primary Domain Controller (PDC). The existence of a PDC promotes the Workgroup to NT Domain status, in which case we write nt_domain<1B> instead of workgroup<1B>. If there is a PDC, it must provide the DMB service for the NT Domain.

Domain Controllers (both Primary and Backup) register the nt_domain<1C> Internet Group name. Registration of the nt_domain<1B> name effectively distinguishes the PDC from all of the other DCs in the domain. The NBNS will ensure that the IP address of the (unique) <1B> name is the first in the list of IP addresses

nt_domain <1C> Internet group Domain Controller
Every domain controller in the NT Domain will register this group name. The NBNS (WINS server) is expected to store all of the IP addresses associated with the name, though it will report at most 25 IP addresses in a NAME QUERY RESPONSE.

The first entry in the list should be the IP address of the Primary Domain Controller (PDC). The rest of the IPs are ordered most recent first. This is atypical handling for group names under WINS. WINS (and, therefore, any NBNS which is WINS-compatible) will usually report only the limited broadcast address (255.255.255.255) when queried for a group name.

workgroup <1D> LAN unique Local Master Browser
This name identifies the Local Master Browser (LMB, sometimes called simply "Master Browser") for a subnet. WINS servers (and any NBNS which is WINS-compatible) will accept registration for <1D> unique names, but when queried will always reply with a NEGATIVE NAME QUERY RESPONSE. As a result, the LMB name is unique within its local subnet only.
workgroup <1E> group Browser Election Service
Every node that is capable of acting as a browser registers this group name so that it can listen for election announcements.
\x01\x02__MSBROWSE__\x02 <01> group Local Master Browser
This group name is registered by all Local Master Browsers (LMBs). It allows LMBs on a local LAN to find one another in order to exchange Browse Lists. This is how Browse Lists for multiple Workgroups and/or NT Domains are combined.


[링크 : http://www.antionline.com/showthread.php?t=247089]
[링크 : http://ubiqx.org/cifs/Appendix-C.html]
Posted by 구차니

deadtime (G)


The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected. The deadtime only takes effect if the number of open files is zero.

This is useful to stop a server's resources being exhausted by a large number of inactive connections.

Most clients have an auto-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users.

Using this parameter with a timeout of a few minutes is recommended for most systems.

A deadtime of zero indicates that no auto-disconnection should be performed.

Default: deadtime = 0

Example: deadtime = 15



keepalive (G)


The value of the parameter (an integer) represents the number of seconds between keepalive packets. If this parameter is zero, no keepalive packets will be sent. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding.

Keepalives should, in general, not be needed if the socket has the SO_KEEPALIVE attribute set on it by default. (see socket options). Basically you should only use this option if you strike difficulties.

Default: keepalive = 300

Example: keepalive = 600



[링크 : http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html]

아래의 문서에서 keepalive 와 deadtime 발견
[링크 : http://xbmc.org/forum/showthread.php?t=312]

deadtime은 분단위로,
keepalive는 초단위로 설정한다.


Posted by 구차니
첫째... 삼바 계정 공유에 쓰기 권한이 없는 경우...
둘째... 삼바 계정과 공유한 디렉토리의 소유권이 다른 경우.
세째... 삼바 계정이 해당 공유 디렉토리에 쓰기 권한 없는 경우

[링크 : http://kldp.org/node/64194]
Posted by 구차니
아무생각없이

mount -t cifs -o user=guest,password=guest 로 했더니

 CIFS VFS: Send error in SessSetup = -13
 CIFS VFS: Send error in SessSetup = -13
mount: mounting \\server\share on /mnt/samba failed: Permission denied

이런 에러가 발생한다.

아무튼 제어판 - 관리도구 - 컴퓨터 관리 에서 확인해보니

Guest User 등록 정보

Guest Group 등록 정보

아무튼 검색을 해보니, 기본적으로 윈도우 간에 파일 공유는 guest 로 로그인을 한다고 하는데,
윈도우 끼리는 접속이 되는데 삼바에서는 guest로 접속이 되지 않는다. 흐음.. 기본 암호가 다르게 쳐서 그런가?

아무튼 guest 대신에 임의의 아이디를 만들면 접속에 이상이 없다.
Posted by 구차니
딱히 용어로 적힌건 발견하지 못했는데

# nmblookup -S "SERVERNAME"
querying STREAM on 192.168.10.255
192.168.10.4 STREAM<00>
Looking up status of 192.168.10.4
        STREAM          <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        STREAM          <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00

nmblookup으로 domain을 해석할때, <00> 이나 <20> <1e> 이러한 값들이 출력이 되는데
그 의미는 아래의 표에 나와있다.

Table 29.1. Unique NetBIOS Names

MACHINENAME<00> Server Service is running on MACHINENAME
MACHINENAME<03> Generic machine name (NetBIOS name)
MACHINENAME<20> LanMan server service is running on MACHINENAME
WORKGROUP<1b> Domain master browser

Table 29.2. Group Names

WORKGROUP<03> Generic name registered by all members of WORKGROUP
WORKGROUP<1c> Domain cntrollers/netlogon servers
WORKGROUP<1d> Local master browsers
WORKGROUP<1e> Browser election service


[링크 : Unique NetBIOS names and group names]
Posted by 구차니
# nmblookup --help
Usage: <NODE> ...
  -B, --broadcast=BROADCAST-ADDRESS      Specify address to use for broadcasts
  -f, --flags                            List the NMB flags returned
  -U, --unicast=STRING                   Specify address to use for unicast
  -M, --master-browser                   Search for a master browser
  -R, --recursion                        Set recursion desired in package
  -S, --status                           Lookup node status as well
  -T, --translate                        Translate IP addresses into names
  -r, --root-port                        Use root port 137 (Win95 only replies to this)
  -A, --lookup-by-ip                     Do a node status on <name> as an IP Address

Help options:
  -?, --help                             Show this help message
  --usage                                Display brief usage message

Common samba options:
  -d, --debuglevel=DEBUGLEVEL            Set debug level
  -s, --configfile=CONFIGFILE            Use alternate configuration file
  -l, --log-basename=LOGFILEBASE         Base name for log files
  -V, --version                          Print version

Connection options:
  -O, --socket-options=SOCKETOPTIONS     socket options to use
  -n, --netbiosname=NETBIOSNAME          Primary netbios name
  -W, --workgroup=WORKGROUP              Set the workgroup name
  -i, --scope=SCOPE                      Use this Netbios scope

[링크 : http://linux.die.net/man/1/nmblookup]

NetBIOS를 resolve 할 수 있는 방법인데

# nmblookup -T "SERVERNAME"
querying STREAM on 192.168.10.255
192.168.10.4 STREAM<00>

# nmblookup -A "IP ADDRESS"
Looking up status of 192.168.10.4
        STREAM          <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        STREAM          <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00

# nmblookup -S "SERVERNAME"

querying STREAM on 192.168.10.255
192.168.10.4 STREAM<00>
Looking up status of 192.168.10.4
        STREAM          <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        STREAM          <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00


보다시피 -S는 -A 와 -T의 조합으로 실행되고, -T를 사용하면 간편하게 아이피를 구할 수 있다.



2011.04.28 추가
헐 검색하고 나니 이미 찾았던 내용이라니 ㅠ.ㅠ
windows의 nbtstat와 유사한 기능을 가진 유틸리티이다. 
Posted by 구차니
netBIOS - Network Basic Input/Output System
netBEUI - NetBIOS Extended User Interface

[링크 : http://en.wikipedia.org/wiki/NetBIOS]
[링크 : http://www.terms.co.kr/NetBEUI.htm]


NBT - NetBIOS over TCP/IP
NBNS - NetBIOS Name Service
WINS - Windows Internet Name Service

[링크 : http://en.wikipedia.org/wiki/NetBIOS_over_TCP/IP#Name_service]
[링크 : http://en.wikipedia.org/wiki/Windows_Internet_Name_Service]


winbind - network account sharing/authentication daemon

[링크 : http://docs.hp.com/ko/B8725-90122/ch07s02.html]

이름은 비슷하지만 winbind는 로그인과 관련된 계정정보를 관할하고
WINS는 DNS와 같은 서버 이름의 해석을 관할한다.
Posted by 구차니
smbd를 구동하고 테스트 삼아
smbclient -L localhost
를 하는데 위와 같은 에러가 발생했다.

일부에서는 설정상에 host allow/host deny 의 설정 오류 혹은
방화벽의 문제일 가능성이 있다고 한다.


(해결 못함..OTL)


[링크 : http://www.linuxquestions.org/questions/linux-server-73/samba-2317-call-returned-zero-bytes-eof-649301/]
[링크 : http://forums.gentoo.org/viewtopic-t-479067-start-0.html] << 이탈리아어
Posted by 구차니
비슷비슷한 내용 -ㅁ-
anonymous / secure 설정에 대한 smb.conf의 예제들이 있다.

[링크 : http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html]
[링크 : http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-samba-servers.html]

2009.12.24 추가
삼바 공식 smb.conf man page
[링크 : http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html]

smb.conf 한글 번역 내용 - oops.org
[링크 : http://sec.tistory.com/entry/smbconf-%EC%84%A4%EC%A0%95]
Posted by 구차니