Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: samba server on s1 dtivo

  1. #1
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021

    samba server on s1 dtivo

    yes, server. i'm trying to build samba 3.0.4 to run on a s1 dtivo such that it can serve files to other machines. my rationale: i have a spare dtivo, it runs (most of) linux, it has a turbonet, it uses very little power, it's quiet and i have two drives to use. in other words, it costs me nothing but time to get it running.

    what i've done so far: downloaded the samba source, built it using libtivohack.a for some of the missing lib calls, and installed it on the tivo with this config file:
    Code:
    [global]
    interfaces = 192.168.1.66/24
    workgroup = HOME
    netbios name = DTIVO3
    security = share
    guest account = root
    hosts allow =
    encrypt passwords = no
    [share1]
    path = /var
    guest only = yes
    writable = yes
    the nmbd and smbd both start and seem groovy, but i can't connect from either windows or linux. windows gives me:
    Code:
    The mapped network drive could not be created because the following error has occurred: The specified network name is no longer available.
    linux gives me:
    Code:
    session setup failed: Call returned zero bytes (EOF)
    any ideas? i don't really know the internals of samba at all, and i've turned debugging on, but nothing in the logs really leaps out at me.

    any ideas?

    ronny

  2. #2
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021
    update: i get the same error even if i try a local mount on the tivo itself. of course, the troubleshooting docs that i've found don't mention this as a potential problem.

    what i see in a packet trace is this:

    client sends negotiate protocol request (0x72), tivo acks
    tivo sends negotiate protocol response
    client sends "session setup andx request", tivo acks
    tivo closes the connection (sends a fin)

    at this point, the close completes on both sides and of course the share doesn't mount. the logs on the tivo, even at debug level ten, don't seem to reveal why the client connect was declined.

    ronny

  3. #3
    Join Date
    Apr 2002
    Posts
    845
    Ronny-

    Try setting up attributes on your samba share as:

    path = /var
    read only = No
    browsable = Yes

    Make sure the shared /var has correct permissions for the user. I'm not sure how user/password would be handled on the crippled tivo os. I think Riley got around this a couple of years ago by using an NFS Server on the windows box instead, haha.

    Hosts allow should be the local subnet and localhost as in:

    Code:
    hosts allow = 192.168.1.1 127.0.0.1
    I'm not sure this is needed, but can't hurt.

    You also might want to bind to the interface, as in:

    Code:
    interfaces = eth0 192.168.1.66
    Last edited by SR712; 07-25-2004 at 07:37 PM.
    If a goldfish should want a vacation, who would know?

  4. #4
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021
    thanks for the reply, sr. tried all of it, no dice.

    back to the drawing board...

    ronny

  5. #5
    Join Date
    Apr 2002
    Posts
    845
    OK. From my Samba manual, Guest Only requires guest ok or public to be YES. Maybe try adding that line.

    Code:
    guest ok = YES
    If a goldfish should want a vacation, who would know?

  6. #6
    Join Date
    Nov 2002
    Posts
    480
    Quote Originally Posted by ronnythunder
    thanks for the reply, sr. tried all of it, no dice.

    back to the drawing board...

    ronny
    Here is a little more for the drawing board. It is my config file for the Samba server on my mac running osx. I spent quite a bit of time trying to get Samba to work with both windows and Linux and was successful. Never got it to work the other way around (smbd). Don't know how universal the syntax is across OSs, so YMMV.

    Here it is:

    # Samba config file created using SSCT
    #
    # This is a default setup for a Mac OS X machine.
    #
    # Global parameters
    [global]
    #
    # The netbios name has to be unique on the network
    netbios name = Mac G4
    server string = Samba %v running on OSX
    #
    # The name of your workgroup or domain
    workgroup = WORKGROUP
    #
    # This security option is the most similar to windows behavour
    security = USER
    #
    # Don't show files starting with . (hidden files) to clients
    # Don't show other known mac specific files either
    veto files = .*/Temporary Items/Desktop */TheFindByContentFolder/TheVolumeSettingsFolder/Network */
    map to guest = Bad User
    guest account = guest

    [homes]
    writeable = Yes
    browseable = No

    [Shared]
    writeable = Yes
    path = /Users/Shared
    guest ok = Yes

    [TheBigOne]
    path = /Volumes/The Big One
    read only = No
    guest ok = Yes
    comment = 30 Gb drive on Mac G4

    [Home]
    path = /
    read only = No
    comment = 4 Gb drive on Mac G4

  7. #7
    Join Date
    Jul 2004
    Posts
    89

    Might be a DNS issue

    NBT (Netbeui over TCP) needs to either talk to a DNS, a Hosts or lmhost or lmhosts files. Since the TIVO does not support DNS resolution is it possible that you need to have these files in the appropriate etc directory on the TIVO for Samba to call? It is worth a try.
    Magnus Unus

  8. #8
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021
    thanks to all who offerred ideas; i think i found the problem. i really didn't think it was configuration related, and it turns out that the issue was yet another one of tivo's broken libc routines, in this case, initgroups(). the routine causes it's caller to just, well, quit. it goes into the routine and never returns. smbd didn't crash, core, anything.

    i just replaced the call to it with a zero (successful return), and lo and behold, i can now mount shares on the tivo to my linux pc!

    i'll try to put together some better instructions and maybe a patch file soon so others can experience samba server goodness on tivo.

    ronny

  9. #9
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021
    i also forgot to mention that i'd reverted to samba 2.2.10 by the time i was successful; the 3.x series was giving me grief with cross compiling among other things. so, with that, here's the readme from my enclosed tar file (remove the .txt) that has the goods so you can do it yourself:
    Code:
    Samba 2.2.10 server on Series 1 TiVo
    ====================================
    
    Steps to build
    --------------
    
    1. Get the Samba 2.2.10 source tarball
    2. Unpack
    3. Install provided patch file
    4. Build libtivohack.a from provided source
       More info here: http://www.xse.com/leres/tivo/downloads/libtivohack/
    5. Install libtivohack.a in your cross compiler's lib dir
    6. Use the following command (all on one line) to build
       from the samba/source dir. Note that the path to your
       compiler may be different:
    
            LIBS=-ltivohack CC=/usr/local/tivo/bin/gcc CFLAGS="-msoft-float" \
                    ./configure --host=powerpc-TiVo-linux --prefix=/usr/samba --without-ssl \
                    --with-configdir=/etc/rc.d --with-logfilebase=/var/log \
                    --with-privatedir=/var/tmp --with-lockdir=/var/tmp \
                    --with-piddir=/var/tmp --disable-cups --disable-winbind
    
    7. Install smbd and nmbd in the location of your choice on the TiVo
    8. Install a valid smb.conf (sample provided, but it must be customized)
       in /etc/rc.d
    9. Start Samba with the following:
    
            /path/to/nmbd -D
            /path/to/smbd -D
    
    10. Logs will appear in /var/log, temp stuff will be in /var/tmp
    ronny
    Attached Files Attached Files

  10. #10
    Join Date
    Apr 2002
    Posts
    845
    Thanks, bud, I'll give this a try. Nice work.
    If a goldfish should want a vacation, who would know?

  11. #11
    Join Date
    Sep 2001
    Location
    West of Bermuda
    Posts
    1,021
    of course, i guess i should have said that the tarball also contains prebuilt binaries for nmbd and smbd, so it's ready to go if one doesn't want to do the build themselves.

    ronny

  12. #12
    Join Date
    Jul 2003
    Posts
    769
    Shweet!

    I myself can't think of any use for this with my setup but it's nice to know it's possible. I already use NFS in the reverse direction for E2FS backups. This may be used in the same way.

    Thanks for the contribution!
    perl -e 'print unpack("u","\@2\&\%V92\!Y;W4\@:&\%C:V5D(\%E/55\(\@5\&EV\;R\!T;V1A>3\\-\`"),"\n";'

  13. #13
    Join Date
    Mar 2002
    Posts
    1,339
    wouldn't take a whole lot more to map recordings into virtual directories for samba based extract/insert
    ---
    Give a man a fish and he will eat for a day. Teach a man to fish and he will sit in a boat all day and drink beer

  14. #14
    Join Date
    Jan 2003
    Posts
    105
    I asked a question on this thread last night. Tonight my post is gone but I am subscribed to this thread... WEIRD.

    Here was my question...

    I have a T60 running 2.5.2. I installed the nmbd and smbd binaries from the file attached to this thread in var/hack/samba. I edited smb.conf to match my settings and placed it in etc/rc.d.

    When I try to start either nmbd or smbd, I get the following error:

    /var/hack/samba/nmbd: error in loading shared libraries
    libdl.so.2: cannot open shared object file: No such file or directory
    Any Suggestions?

  15. #15
    Join Date
    Mar 2002
    Posts
    1,339
    not so much, that's more of a support question and this is a dev thread...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •