[Samba] Does this tell me anything? Traffic report
Matt Burkhardt
mlb at imparisystems.com
Tue Jun 9 13:11:27 GMT 2009
On Tue, 2009-06-09 at 14:33 +1000, Chris Smart wrote:
> 2009/6/8 Matt Burkhardt <mlb at imparisystems.com>:
> >> Just a few thoughts:
> >> Is Samba only listening on localhost rather than your ethernet device?
>
> Have you set anything for interfaces in your /etc/samba/smb.conf? If
> so, try taking it out or ensuring it's correct.
I searched for "interface" in smb.conf and came up with nothing - here's
my smb.conf from SWAT
# Samba config file created using SWAT
# from 192.168.1.105 (192.168.1.105)
# Date: 2009/06/09 08:31:42
[global]
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
passdb backend = ldapsam:ldap://localhost
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *all*authentication*tokens*updated*
log level = 2
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
name resolve order = lmhosts host bcast
server signing = auto
printcap name = cups
add machine script = /usr/sbin/smbldap-useradd -t 0 -w "%u"
logon script = logon.cmd
logon path = \\%N\profiles\%U
logon drive = H:
domain logons = Yes
os level = 35
dns proxy = No
ldap admin dn = cn=admin,dc=imparisystems,dc=local
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap machine suffix = ou=Computers
ldap suffix = dc=imparisystems,dc=local
ldap ssl = no
ldap user suffix = ou=Users
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[Profiles]
comment = Users profiles
path = /samba/profiles
read only = No
profile acls = Yes
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
admin users = root
write list = root
read only = No
create mask = 0600
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
admin users = root
write list = root, @Administrators
create mask = 0664
directory mask = 0775
[tmp]
path = /tmp
guest ok = Yes
>
> >
> > I was thinking that might be the problem, but I don't know how to
> > check / fix it...
> >> What does 'sudo netstat -lt' show?
>
> Unless I'm mistaken, I can't see Samba listening on your machine. You
> should have something like:
>
> tcp 0 0 *:netbios-ssn *:*
> tcp 0 0 *:microsoft-ds *:*
>
> Can you also try netstat -ltu? Maybe it's UDP only.
Here's what I get
netstat -ltu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:amanda *:* LISTEN
tcp 0 0 localhost:8100 *:* LISTEN
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 *:ldap *:* LISTEN
tcp 0 0 *:sane-port *:* LISTEN
tcp 0 0 *:mysql *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:webmin *:* LISTEN
tcp 0 0 *:www *:* LISTEN
tcp 0 0 *:81 *:* LISTEN
tcp 0 0 *:82 *:* LISTEN
tcp 0 0 *:8083 *:* LISTEN
tcp 0 0 *:83 *:* LISTEN
tcp 0 0 ubuntu.imparisys:domain *:* LISTEN
tcp 0 0 localhost:domain *:* LISTEN
tcp 0 0 *:ipp *:* LISTEN
tcp 0 0 *:postgresql *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp 0 0 localhost:953 *:* LISTEN
tcp 0 0 *:https *:* LISTEN
tcp 0 0 *:49852 *:* LISTEN
tcp6 0 0 localhost:8005 [::]:* LISTEN
tcp6 0 0 [::]:ldap [::]:* LISTEN
tcp6 0 0 [::]:8009 [::]:* LISTEN
tcp6 0 0 [::]:5001 [::]:* LISTEN
tcp6 0 0 [::]:webcache [::]:* LISTEN
tcp6 0 0 [::]:domain [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 [::]:ipp [::]:* LISTEN
tcp6 0 0 [::]:postgresql [::]:* LISTEN
udp 0 0 ubuntu.impar:netbios-ns *:*
udp 0 0 *:netbios-ns *:*
udp 0 0 ubuntu.impa:netbios-dgm *:*
udp 0 0 *:netbios-dgm *:*
udp 0 0 *:10000 *:*
udp 0 0 *:34836 *:*
udp 0 0 ubuntu.imparisys:domain *:*
udp 0 0 localhost:domain *:*
udp 0 0 *:bootps *:*
udp 0 0 *:tftp *:*
udp 0 0 *:sunrpc *:*
udp 0 0 *:38390 *:*
udp 0 0 *:ipp *:*
udp 0 0 *:ldaps *:*
udp6 0 0 [::]:domain [::]:*
udp6 0 0 [::]:58044 [::]:*
>
> I can see SWAT there.. can you connect to it?
Yes, but it acts kind of funky. Although I see both daemons running,
the status page says
version:3.0.28a
smbd:not running
nmbd:running
winbindd:not running
In addition, I don't see the Globals, Shares, Printers or Wizards
buttons and everytime I run sudo /etc/init.d/samba stop I have to kill
the smbd process - don't know if that means anything.
>
> >> Is the daemon running? 'sudo ps aux |grep smb'
> >
> > sudo ps -e | grep mb
> > 31686 ? 00:00:01 nmbd
> > 31688 ? 00:00:00 smbd
> >
>
> OK, so it looks like you have some daemons running..
>
> >> Are you blocking anything in /etc/hosts.deny or /etc/hosts.allow?
> >>
> > They both contain only commented lines - no information other than that
>
> OK, so that's fine.
>
> What do the logs say?
I have three log files - log.swat, log.nmbd and log.smbd. I didn't
include log.swat because it really doesn't say anything. Here's log.nmb
at log level 2 after a /etc/init.d/samba stop - delete logs - start
Netbios nameserver version 3.0.28a started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/06/09 08:51:24, 2] nmbd/nmbd.c:main(745)
Becoming a daemon.
[2009/06/09 08:51:24, 2] lib/tallocmsg.c:register_msg_pool_usage(105)
Registered MSG_REQ_POOL_USAGE
[2009/06/09 08:51:24, 2] lib/dmallocmsg.c:register_dmalloc_msgs(75)
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2009/06/09 08:51:24, 2] lib/interface.c:add_interface(81)
added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0
[2009/06/09 08:51:24, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
making subnet name:192.168.1.100 Broadcast address:192.168.1.255 Subnet mask:255.255.255.0
[2009/06/09 08:51:24, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
making subnet name:UNICAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0
[2009/06/09 08:51:24, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
making subnet name:REMOTE_BROADCAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0
[2009/06/09 08:51:24, 2] nmbd/nmbd_lmhosts.c:load_lmhosts_file(41)
load_lmhosts_file: Can't open lmhosts file /etc/samba/lmhosts. Error was No such file or directory
[2009/06/09 08:51:24, 0] nmbd/nmbd_logonnames.c:add_logon_names(163)
add_domain_logon_names:
Attempting to become logon server for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:24, 2] nmbd/nmbd_logonnames.c:become_logon_server(136)
become_logon_server: Atempting to become logon server for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:24, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(290)
become_domain_master_browser_bcast:
Attempting to become domain master browser on workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:24, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(303)
become_domain_master_browser_bcast: querying subnet 192.168.1.100 for domain master browser on workgroup WORKGROUP
[2009/06/09 08:51:28, 0] nmbd/nmbd_logonnames.c:become_logon_server_success(124)
become_logon_server_success: Samba is now a logon server for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:28, 2] nmbd/nmbd_become_dmb.c:become_domain_master_stage1(181)
become_domain_master_stage1: Becoming domain master browser for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:30, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:32, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:32, 0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(113)
*****
Samba server UBUNTU is now a domain master browser for workgroup WORKGROUP on subnet 192.168.1.100
*****
[2009/06/09 08:51:35, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:37, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:39, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:39, 2] nmbd/nmbd_elections.c:run_elections(204)
run_elections: >>> Won election for workgroup WORKGROUP on subnet 192.168.1.100 <<<
[2009/06/09 08:51:39, 2] nmbd/nmbd_become_lmb.c:become_local_master_browser(537)
become_local_master_browser: Starting to become a master browser for workgroup WORKGROUP on subnet 192.168.1.100
[2009/06/09 08:51:47, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
*****
Samba name server UBUNTU is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.100
*****
and here's for log.smbd
[2009/06/09 08:51:24, 0] smbd/server.c:main(944)
smbd version 3.0.28a started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/06/09 08:51:24, 2] param/loadparm.c:do_section(3819)
Processing section "[homes]"
[2009/06/09 08:51:24, 2] param/loadparm.c:do_section(3819)
Processing section "[Profiles]"
[2009/06/09 08:51:24, 2] param/loadparm.c:do_section(3819)
Processing section "[printers]"
[2009/06/09 08:51:24, 2] param/loadparm.c:do_section(3819)
Processing section "[print$]"
[2009/06/09 08:51:24, 2] param/loadparm.c:do_section(3819)
Processing section "[tmp]"
[2009/06/09 08:51:24, 2] lib/interface.c:add_interface(81)
added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0
[2009/06/09 08:51:24, 2] lib/tallocmsg.c:register_msg_pool_usage(105)
Registered MSG_REQ_POOL_USAGE
[2009/06/09 08:51:24, 2] lib/dmallocmsg.c:register_dmalloc_msgs(75)
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2009/06/09 08:51:24, 2] lib/smbldap_util.c:smbldap_search_domain_info(256)
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=WORKGROUP))]
[2009/06/09 08:51:24, 2] lib/smbldap.c:smbldap_open_connection(786)
smbldap_open_connection: connection opened
[2009/06/09 08:51:24, 2] passdb/pdb_ldap.c:init_sam_from_ldap(545)
init_sam_from_ldap: Entry found for user: root
[2009/06/09 08:51:24, 2] passdb/pdb_ldap.c:init_group_from_ldap(2167)
init_group_from_ldap: Entry found for group: 544
Thanks for your time and attention!
>
> -c
--
Matt Burkhardt, M.Sci. Technology Management
mlb at imparisystems.com
(301) 682-7901
502 Fairview Avenue
Frederick, MD 21701
http://www.imparisystems.com
More information about the samba
mailing list