LinHES Forums
http://forums.linhes.org/

Samba Issues
http://forums.linhes.org/viewtopic.php?f=6&t=18118
Page 1 of 1

Author:  tama102 [ Tue Apr 01, 2008 9:38 am ]
Post subject:  Samba Issues

I am having a hard time getting samba to work. I had it working on R5C7, but now its not work with R5F27. I think it has something to do with the name/password. I tried adding

passdb backend = smbpasswd

to the smb.conf file, but that didn’t help. Here is my output from /var/log/samba/log.nmbd


Code:
 [2008/04/01 10:15:51, 0] nmbd/nmbd.c:main(699)
  Netbios nameserver version 3.0.24 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2006
[2008/04/01 10:15:52, 0] nmbd/nmbd_nameregister.c:register_name_response(130)
  register_name_response: server at IP 192.168.0.8 rejected our name registration of MYTHTV<20> IP 192.168.0.7 with error code 6.
[2008/04/01 10:15:52, 0] nmbd/nmbd_mynames.c:my_name_register_failed(36)
  my_name_register_failed: Failed to register my name MYTHTV<20> on subnet 192.168.0.7.
[2008/04/01 10:15:52, 0] nmbd/nmbd_namelistdb.c:standard_fail_register(305)
  standard_fail_register: Failed to register/refresh name MYTHTV<20> on subnet 192.168.0.7
[2008/04/01 10:15:52, 0] nmbd/nmbd_nameregister.c:register_name_response(130)
  register_name_response: server at IP 192.168.0.8 rejected our name registration of MYTHTV<03> IP 192.168.0.7 with error code 6.
[2008/04/01 10:15:52, 0] nmbd/nmbd_mynames.c:my_name_register_failed(36)
  my_name_register_failed: Failed to register my name MYTHTV<03> on subnet 192.168.0.7.
[2008/04/01 10:15:52, 0] nmbd/nmbd_namelistdb.c:standard_fail_register(305)
  standard_fail_register: Failed to register/refresh name MYTHTV<03> on subnet 192.168.0.7
[2008/04/01 10:15:52, 0] nmbd/nmbd_nameregister.c:register_name_response(130)
  register_name_response: server at IP 192.168.0.8 rejected our name registration of MYTHTV<00> IP 192.168.0.7 with error code 6.
[2008/04/01 10:15:52, 0] nmbd/nmbd_mynames.c:my_name_register_failed(36)
  my_name_register_failed: Failed to register my name MYTHTV<00> on subnet 192.168.0.7.
[2008/04/01 10:15:52, 0] nmbd/nmbd_namelistdb.c:standard_fail_register(305)
  standard_fail_register: Failed to register/refresh name MYTHTV<00> on subnet 192.168.0.7
[2008/04/01 10:16:55, 0] nmbd/nmbd_packets.c:process_browse_packet(1067)
  process_browse_packet: Discarding datagram from IP 192.168.0.8. Source name MYTHTV<00> is one of our names !
[2008/04/01 10:22:59, 0] nmbd/nmbd_packets.c:process_browse_packet(1067)
  process_browse_packet: Discarding datagram from IP 192.168.0.8. Source name MYTHTV<00> is one of our names !
[2008/04/01 10:30:03, 0] nmbd/nmbd_packets.c:process_browse_packet(1067)
  process_browse_packet: Discarding datagram from IP 192.168.0.8. Source name MYTHTV<00> is one of our names !



I am sure this is an easy fix, sorry I am such a linux noob. Any help would be great.

Author:  slowtolearn [ Tue Apr 01, 2008 11:01 am ]
Post subject: 

Do you have 2 boxes running Samba on the same network with the same netbios name? eg. MYTHTV on 192.168.0.7 and MYTHTV on 192.168.0.8?

Author:  tama102 [ Tue Apr 01, 2008 1:16 pm ]
Post subject: 

Now that log.nmbd file comes out clean (see below)


Code:
 Netbios nameserver version 3.0.24 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2006
[2008/04/01 13:47:13, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
  *****

  Samba name server MYTHTV is now a local master browser for   workgroup KNOPPMYTH on subnet 192.168.0.7

  *****

I can now do a manual mount using the command:

Code:
smbmount //DESKTOP/Music /myth/music/Desktop



However, my files fill not mount automatically when I restart my computer. Here is a copy of my /var/log/samba/log.smbd


Code:
[2008/04/01 13:41:31, 0] smbd/server.c:main(847)
  smbd version 3.0.24 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2006
[2008/04/01 13:41:31, 0] printing/pcap.c:pcap_cache_reload(159)
  Unable to open printcap file /etc/printcap for read!
[2008/04/01 13:41:31, 0] printing/pcap.c:pcap_cache_reload(159)
  Unable to open printcap file /etc/printcap for read!
[2008/04/01 13:42:34, 0] lib/util_sock.c:get_peer_addr(1229)
  getpeername failed. Error was Transport endpoint is not connected
[2008/04/01 13:42:34, 0] lib/util_sock.c:write_data(562)
  write_data: write failure in writing to client 192.168.0.4. Error Connection reset by peer
[2008/04/01 13:42:34, 0] lib/util_sock.c:send_smb(769)
  Error writing 4 bytes to client. -1. (Connection reset by peer)
[2008/04/01 13:42:34, 1] smbd/service.c:make_connection_snum(950)
  desktop (192.168.0.4) connect to service myth initially as user mythtv (uid=100, gid=102) (pid 3626)
[2008/04/01 13:42:39, 1] smbd/service.c:close_cnum(1150)
  desktop (192.168.0.4) closed connection to service myth
[2008/04/01 13:42:39, 1] smbd/service.c:make_connection_snum(950)
  desktop (192.168.0.4) connect to service myth initially as user mythtv (uid=100, gid=102) (pid 3626)
[2008/04/01 13:42:39, 1] smbd/service.c:close_cnum(1150)
  desktop (192.168.0.4) closed connection to service myth
[2008/04/01 13:42:39, 1] smbd/service.c:make_connection_snum(950)
  desktop (192.168.0.4) connect to service myth initially as user mythtv (uid=100, gid=102) (pid 3626)
[2008/04/01 13:45:25, 0] printing/pcap.c:pcap_cache_reload(159)
  Unable to open printcap file /etc/printcap for read!
[2008/04/01 13:45:25, 0] printing/pcap.c:pcap_cache_reload(159)
  Unable to open printcap file /etc/printcap for read!


And here is a copy of my fstab file (password ‘xxxx’):

Code:
# /etc/fstab: filesystem table.
#
# filesystem  mountpoint  type  options  dump  pass
/dev/hda1  /  ext3 defaults,errors=remount-ro  0  1
/dev/hda3  /myth  ext3  defaults,auto  0  2

proc  /proc  proc  defaults  0  0
/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
sysfs  /sys  sysfs  defaults  0  0
tmpfs  /dev/shm  tmpfs defaults  0  0
/dev/cdrom /cdrom  auto  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/hda2 none swap defaults 0 0
//LAPTOP/Pictures /myth/gallery/Laptop/ smbfs username=Shandi,password=xxxx 0 0
//LAPTOP/Music /myth/music/Laptop/ smbfs username=Shandi,password=xxxx 0 0
//LAPTOP/Movies /myth/video/Laptop/ smbfs username=Shandi,password=xxxx 0 0
//DESKTOP/Pictures /myth/gallery/Desktop/ smbfs username=John,password=xxxx 0 0
//DESKTOP/Music /myth/music/Desktop/ smbfs username=John,password=xxxx 0 0
//DESKTOP/Movies /myth/video/Desktop/ smbfs username=John,password=xxxx0 0


And here is my /etc/samba/smb.conf file:

Code:
;
; /etc/samba/smb.conf
;
; Sample configuration file for the Samba suite for Debian GNU/Linux
;
; Please see the manual page for smb.conf for detailed description of
;       every parameter.
;

[global]
        load printers = yes
        guest account = nobody
        name resolve order = lmhosts host wins bcast
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
#       socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
        socket options = TCP_NODELAY
        passdb backend = smbpasswd
        passwd program = /usr/bin/passwd %u
        dns proxy = no
        printing = bsd
        server string = KnoppMyth R5
        invalid users = root
        unix password sync = false
        workgroup = KnoppMyth
        syslog only = no
        os level = 20
        printcap name = /etc/printcap
        syslog = 0;
        security = user
        panic action = /usr/share/samba/panic-action %d
        short preserve case = yes
        max log size = 1000

[homes]
   comment = Home Directories
   browseable = no

; By default, the home directories are exported read only. Change next
;       parameter to "no" if you want to be able to write to them.
   read only = yes

; File creation mask is set to 0700 for security reasons. If you want to
;       create files with group=rw permissions, set next parameter to 0775.
   create mask = 0700

; Directory creation mask is set to 0700 for security reasons. If you want to
;       create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0700


[myth]
        comment = Myth files
        writeable = yes
        valid users = mythtv
        path = /myth




Anyone know why stuff wont mount when I restart?

FYI (I followed the samba instructions on the wiki exactly. I did the update-rc.d samba defaults

Author:  slowtolearn [ Tue Apr 01, 2008 4:14 pm ]
Post subject: 

I have only tried mounting Samba shares via fstab a couple of times, and never got it working. I suspect it has to do with some network component(s) not being available at the time fstab is parsed, but haven't researched it.

Try creating a script in /etc/rc5.d (say S99SMBmount) and adding your mount command to that. Be sure to make the script executable.

Author:  tama102 [ Tue Apr 01, 2008 4:19 pm ]
Post subject: 

Thats just it, I am the one that is 'slow-to-learn', I have no idea how to do what you just said in your last post. I can really only do step by step instructions as posted in the wiki..... I suck.

Author:  slowtolearn [ Tue Apr 01, 2008 4:31 pm ]
Post subject: 

tama102 wrote:
Thats just it, I am the one that is 'slow-to-learn', I have no idea how to do what you just said in your last post. I can really only do step by step instructions as posted in the wiki..... I suck.
Eh, we all "sucked" at some point!

Here you go (as root):
Code:
echo "smbmount //DESKTOP/Music /myth/music/Desktop" >/etc/rc5.d/S99SMBMount
chmod 755 /etc/rc5.d/S99SMBMount

If that mount command worked for you from the command line the above should work for you upon reboot. You probably want to remove those smbfs entries from your /etc/fstab.

If that works you can add the rest of the mount commands with
Code:
echo "smbmount //<whatever>/<whatever> /<wherever>/<wherever>/<wherever>" >>/etc/rc5.d/S99SMBMount
Note the double > (>>), this will append to the existing file...

Author:  tama102 [ Tue Apr 01, 2008 5:01 pm ]
Post subject: 

Hmm, that didn’t seem to work. Maybe because when I got this to work:

Code:
smbmount //DESKTOP/Music /myth/music/Desktop


I was prompted for my windows password, which I entered. There does not seem to place to input a password with this method.
Code:

Author:  slowtolearn [ Tue Apr 01, 2008 5:20 pm ]
Post subject: 

tama102 wrote:
Hmm, that didn’t seem to work. Maybe because when I got this to work:

Code:
smbmount //DESKTOP/Music /myth/music/Desktop


I was prompted for my windows password, which I entered. There does not seem to place to input a password with this method.
Well, you didn't mention that, now did you? :wink: Details matter...

This is the mount command I have used in the past:
Code:
/usr/bin/smbmount //SLACKBOX/SMBShare /home/scott/mnt/SLACKBOX/SMBShare -ousername=scott,password=xxxx,uid=1000,gid=1000,fmask=644,dmask=755
(That's all one line) You may not need all of the options, but you can see how to define the username/password in the mount command.

NOTE: As the above does not come from my KM boxen you should type man smbmount for particular options/information on your system.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/