$ ll /usr/bin/smb*
-rwxr-xr-x 1 root root 2109576 Sep  2  2006 /usr/bin/smbcacls
-rwxr-xr-x 1 root root 1177152 Sep  2  2006 /usr/bin/smbclient
-rwxr-xr-x 1 root root  748836 Sep  2  2006 /usr/bin/smbcontrol
-rwxr-xr-x 1 root root 2002796 Sep  2  2006 /usr/bin/smbcquotas
-rwxr-xr-x 1 root root 2080776 Sep  2  2006 /usr/bin/smbget
-rwxr-xr-x 1 root root 2006920 Sep  2  2006 /usr/bin/smbpasswd
-rwxr-xr-x 1 root root    2295 Sep  2  2006 /usr/bin/smbprint
-rwxr-xr-x 1 root root  911124 Sep  2  2006 /usr/bin/smbspool
-rwxr-xr-x 1 root root  727968 Sep  2  2006 /usr/bin/smbstatus
-rwxr-xr-x 1 root root    4896 Sep  2  2006 /usr/bin/smbtar
-rwxr-xr-x 1 root root 1091552 Sep  2  2006 /usr/bin/smbtree

다른건 잘 모르겠고,
smbtree는 workgroup / computer 별로 공유되어 있는 목록을 보여주는 프로그램이다.

$ smbtree
Password:
WORKGROUP
        \\STREAM
                \\STREAM\C$                     Default share
                \\STREAM\ADMIN$                 Remote Admin
                \\STREAM\temp
                \\STREAM\D$                     Default share
                \\STREAM\IPC$                   Remote IPC
                \\STREAM\Stream Data
                \\STREAM\E$                     Default share
MSHOME
        \\KSJEON
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine KSJEON.  Error was NT_STATUS_ACCESS_DENIED

이런식으로 쭈욱 나온다.

[링크 : http://master.samba.org/samba/docs/man/manpages-3/smbtree.1.html]
--------------------
smbstatus는 현재 삼바서버에 접속중인 클라이언트의 목록을 보여준다.

$ smbstatus

Samba version 3.0.23c-2
PID     Username      Group         Machine
-------------------------------------------------------------------
 2515   nevis1        dev           kwangho      (192.168.10.5)

Service      pid     machine       Connected at
-------------------------------------------------------
nevis1       2515   kwangho       Mon Aug 17 17:39:15 2009

No locked files

[링크 : http://master.samba.org/samba/docs/man/manpages-3/smbstatus.1.html]


-----------------
c 언어에서 조작하는 방법(source of smbtree.c)

[링크 : http://www.koders.com/c/fidB866C576E4391966493432682AF098446FDE9468.aspx?s=%22sam%22#L199]
[링크 : http://www.codase.com/search/display?file]
Posted by 구차니