PDA

View Full Version : samba server on s1 dtivo



ronnythunder
07-25-2004, 12:14 PM
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:
[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:
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:
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

ronnythunder
07-25-2004, 05:30 PM
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

SR712
07-25-2004, 07:34 PM
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. :rolleyes:

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


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:


interfaces = eth0 192.168.1.66

ronnythunder
07-27-2004, 01:19 AM
thanks for the reply, sr. tried all of it, no dice.

back to the drawing board...

ronny

SR712
07-27-2004, 10:02 AM
OK. From my Samba manual, Guest Only requires guest ok or public to be YES. Maybe try adding that line.


guest ok = YES

rfc
07-28-2004, 09:05 PM
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

my0gr81
07-29-2004, 04:41 PM
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.

ronnythunder
07-31-2004, 12:43 AM
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

ronnythunder
08-01-2004, 11:40 AM
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:
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

SR712
08-01-2004, 12:53 PM
Thanks, bud, I'll give this a try. Nice work. :D

ronnythunder
08-01-2004, 04:39 PM
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

cojonesdetoro
08-02-2004, 11:14 AM
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!

rc3105
08-02-2004, 05:35 PM
wouldn't take a whole lot more to map recordings into virtual directories for samba based extract/insert ;)

lonaman
10-26-2004, 12:09 AM
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?

rc3105
10-26-2004, 12:16 AM
not so much, that's more of a support question and this is a dev thread...

lonaman
10-26-2004, 12:27 AM
My apologies... if anyone wants to lend a helping hand, I posted the question in the "Support" forum here (http://www.dealdatabase.com/forum/showthread.php?p=190613#post190613)

Thanks.