May 23, 2013, 08:23:20 am
News:
Pages: [1] 2
Print
Author Topic: smbd  (Read 8062 times)
bagster
Sr. Member
****
Posts: 270


View Profile
« on: February 15, 2008, 02:52:05 pm »

Hi,

I compiled samba to allow the OSD to act as a file server.
It's a very "ugly" plain compile.  I didn't clean uneccesary binarys, neither stripped good ones.
It's just a "proof of concept" to test it that works.

You can get it there:
https://svn.neurostechnology.com/hackers/bagster/smbd/

Use the command line in the readme to start it.
If it work as you want, just remote the -S and -i flags to launch it as a daemon.

I'm not sure of the security of my config file, so be careful if you have sensitive data.

I hate debugging samba problems, so just connect as guest, of fine-tune the config as you want, but without my help Wink

In the next recompile i'll check to make it smaller.

The only 2 shares in the smb.conf are the USB and CF cards, feel free to add the ones you want.
(I tried to put directly /media, but as they are symlinks, I was ending browsing my local filesystem)

I haven't check yet the performance of this.  When I'll be home, I'll try to use this to play files stored on one osd on a second one.
If that work, I'll try reading a .asf file. This way i'll be able to "mirror" what's playing on 1 TV set.

I'll let you know later if that worked.
But if someone want to test, I'll appreciate! Smiley
Logged
bagster
Sr. Member
****
Posts: 270


View Profile
« Reply #1 on: February 15, 2008, 03:06:49 pm »

I was thinking of a way to simplify the problem with differents paths. (If I put my binarys in, let's say, a SD card, but others put them on USB, it's not easy to make a package that work for everyone).

What do you think of this:

We may all (all that want to add features to their OSD, that's it Wink) create a folder in /mnt/OSD called "loopbackfs"
In this folder, each project can have is own folder.

So, no matter where you put your files, you just have to "loopback mount" the directory in this folder.
You can do loopback mounts like this:

mount -o loop /mnt/tmpfs/mount_USB/samba/ /mnt/OSD/loopbackfs/samba

This way, I'll configure samba to be installed in "/mnt/OSD/loopbackfs/samba".  So just running ./smbd in this folder will start every smbd, no mather where people put their files.

Do you think it's a good solution?
If yes I'll do all my compile with -prefix=/mnt/OSD/loopbackfs/"project"

I know that may sound complicated, but those that understand what I mean can help me to make it more simple for next projects.


Logged
greyback
Administrator
Hero Member
*****
Posts: 1639


View Profile
« Reply #2 on: February 15, 2008, 04:09:37 pm »

Well a soft link between /mnt/OSD and your storage might be easier notion. E.g.
Code:
ln -s /mnt/tmpfs/mount_USD/apps /mnt/OSD/apps

Even a /bin, /lib and other directories in /mnt/OSD might be cleaner, would prevent executables  ending up all over the place. And what on the CF card could we use as storage?

MattJ should be the man to talk to, however his package manager works is how we should proceed, to keep everyone's implementation the same!

Nerochiaro has added to Arizona the ability for us to set ld paths so libraries can be anywhere we want.
-G
Logged
bagster
Sr. Member
****
Posts: 270


View Profile
« Reply #3 on: February 15, 2008, 04:22:22 pm »

Yeah links can probably do the job too.
MattJ, how do you think we should proceed?

Logged
MattJ
Newbie
*
Posts: 37


View Profile
« Reply #4 on: February 15, 2008, 08:23:23 pm »

I have smbd compiled and working (it works smoothly OSD<->OSD and OSD<->PC). Regarding paths, this is something Lpkg was made to take care of. I just haven't got around to making and uploading a package for samba yet. I'm stuck in Vista for a few hours, but when I get back to Linux I'll upload the package so you can check it out and comment.

I'll keep you posted.
Logged
MattJ
Newbie
*
Posts: 37


View Profile
« Reply #5 on: February 16, 2008, 10:09:40 pm »

I uploaded the package as promised. If you don't have Lpkg already, install it according to the instructions at: http://groups.google.com/group/Neuros/browse_thread/thread/5b69bb6e6c6afeaf (be sure to follow all the steps, up to and including running 'lpkg update') Update: Now see http://matthewwild.co.uk/projects/lpkg/osd on installing Lpkg.

Once you have done that:

Code:
lpkg install sambaserver

lpkg control sambaserver start

It's certain that configuration/etc. will need to be updated, so any suggestions, please let me know Smiley
« Last Edit: June 16, 2009, 10:43:19 am by greyback » Logged
Pinocchio
Newbie
*
Posts: 17


View Profile
« Reply #6 on: April 16, 2008, 06:47:01 pm »

Where is the package you upload?
Logged
MattJ
Newbie
*
Posts: 37


View Profile
« Reply #7 on: April 16, 2008, 09:06:54 pm »

Hi,

This link replaces the guide I linked to in my previous post: http://matthewwild.co.uk/projects/lpkg/osd

It will help you install a package manager, which will help you download, install and run sambaserver.

If you need any help, or something is unclear, let me know.
Logged
Pinocchio
Newbie
*
Posts: 17


View Profile
« Reply #8 on: April 17, 2008, 10:16:39 am »

I followed your instruction, the process was easy and smooth (you did really good job there),  and it seems that the samba server was installed and running. But I can't find the shared USB hard drive in my computer, and I can't ping through it by its netbios name: osd either. 

Now my questions are: how do I know samba server is running? how do I stop it and restart it again?
Logged
MattJ
Newbie
*
Posts: 37


View Profile
« Reply #9 on: April 17, 2008, 10:45:50 am »

I followed your instruction, the process was easy and smooth (you did really good job there),  and it seems that the samba server was installed and running.

Wow, that's great, thanks!

Quote
But I can't find the shared USB hard drive in my computer, and I can't ping through it by its netbios name: osd either.

I have never got a hostname to work for the OSD, I am successfully using it via its IP address (you can find this with "ifconthig eth0").

I realise now though that I have my OSD's IP statically configured, and I don't use DHCP. If anyone knows how to fix any issues with smbd, the OSD, and a DHCP setup, please let me know, as I am unable to test it myself.

Quote
Now my questions are: how do I know samba server is running? how do I stop it and restart it again?

The following should list several entries while smbd is running:
ps | grep smbd

To stop it:
lpkg control sambaserver stop
Logged
jsdf
Sr. Member
****
Posts: 329


View Profile
« Reply #10 on: April 17, 2008, 02:04:57 pm »

How does lpkg interact with Wooble?  Or are they two separate projects?
Logged
jsdf
Sr. Member
****
Posts: 329


View Profile
« Reply #11 on: April 17, 2008, 02:34:28 pm »

How does lpkg interact with Wooble?  Or are they two separate projects?
Never mind that, I see that Wooble is one of many packages that can be loaded by lpkg.
Logged
MattJ
Newbie
*
Posts: 37


View Profile
« Reply #12 on: April 17, 2008, 02:44:42 pm »

Two separate projects.

Lpkg is a package manager which allows easy installation of programs on the OSD, and wooble is a web interface (which happens to be one of the things you can install using Lpkg).

I've been holding off from pushing them widely until I had enough feedback to know there were no problems, but I am confident now that at least Lpkg is ready for general use.

wooble, well, I need more testers (I will post more [on the mailing list] on this tonight), and then I shall announce a new version of that also.

More info at http://matthewwild.co.uk/projects/Lpkg and http://matthewwild.co.uk/projects/wooble
Logged
Pinocchio
Newbie
*
Posts: 17


View Profile
« Reply #13 on: April 17, 2008, 08:36:44 pm »

Thanks MattJ, IP address work well for me, I am using static too.  good work!

With your default conf file 4 folders are shared under Home network group: media, sd, usb and printers and faxes. but the sd is only accessible from media folder.

One thing worth memtioning is that lpkg control sambaserver stop/start command always returns a failing message even though the command is executed. I was confused for a while there.

one more thing, Is there anyway samberserver can be started everytime osd reboot?
Logged
mgschwan
Newbie
*
Posts: 27


View Profile
« Reply #14 on: April 18, 2008, 12:31:55 am »

Wow, It's great to have an smb server on the OSD, although i currently have no disk connected to my OSD.

How hard would it be to activate WebDAV support for the built in lighttpd server, this would also allow people to access their directories over the internet? So they could use smb shares for their local LAN and user/passowrt protected WebDAV Directories over the internet.

Logged
Pages: [1] 2
Print
Jump to: