PDA

Bekijk de volledige versie : Samba running



erik_bies
06-03-2004, 19:20
Hey,

What would be the chance to get Samba running on this box. I really would love to have something running where I can map my windows drive to (so alternatively some webdav would prob also work)

Then I can kick out my current Linux box that does all that.

If not, what would be the main bottleneck?
Memory?
Speed?

Ok, Thanks

Erik

Oleg
09-03-2004, 10:43
Go ahead and try compiling it. In my opinion it will be too large for flashing it, but you can probably run it from the external usb flash/disk. Also, the performance will be really low, due to the both CPU speed & usb 1.1 bandwidth limitations.

erik_bies
21-03-2004, 19:28
Hi Oleg,

Thanks for your reply. Well, tried it, but sofar not being successfull.

Any suggestion to resolve this kind of problems

Compiling smbd/server.c
In file included from smbd/server.c:22:
include/includes.h:636: conflicting types for `sys_errlist'
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/include/stdio.h:551: previous declaratio
n of `sys_errlist'
In file included from smbd/server.c:22:
include/includes.h:874: conflicting types for `memmove'
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/include/string.h:42: previous declaratio
n of `memmove'
include/includes.h:878: conflicting types for `initgroups'
/opt/brcm/hndtools-mipsel-uclibc-0.9.19/include/grp.h:148: previous declaration
of `initgroups'
make: *** [smbd/server.o] Error 1

Oleg
22-03-2004, 09:27
Samba version?

justwords
22-03-2004, 10:30
Seems that the new netgear WGT634 has samba and usb 2.0 built in! So you can access usb-disks from every program.


http://www.netgear.com/products/details/WGT634U.php?view=hm

Oleg
22-03-2004, 11:49
Looks cool. Seems it's use broadcom CPU, Linux 2.4.20 (at offset 0x6894 of firmware) and jffs2 as rootfs (at 0x140000).

justwords
22-03-2004, 12:19
Broadcom CPU? The wireless chipset is from atheros, not broadcom! Or is the software cpu and the wireless chip integrated? If broadcom does cpus, they might have combined atheros chipset and broadcom cpu. Though i think not.

Oleg
22-03-2004, 14:47
Yes, just downloaded pdf from FCC with internal fotos. So, the radio is from atheros, the CPU is broadcom BCM5364PKPB and seems it has switch and phys integrated into it, 2 dram chips and the flash chip from NEC.
And yes, it runs linux 2.4.20 with apps compiled against the same uclibc as others. The root file system is jffs2 and has packed tools from http://leaf-project.org.

The samba config follows (personally I think guest account = root is the best thing ever ;-) Samba version is 1.9.16 as seems. They mount usb disk under /share.

[global]
workgroup = workgroup
netbios name = WGT634U
guest account = root
security = share
browseable = yes
guest ok = yes
log level = 1
max log size = 1
os level = 0
encrypt passwords = no
[share]
path = /share
read only = No
guest ok = Yes
browseable = Yes
[samples]
path = /samples
read only = No
guest ok = Yes
browseable = Yes

erik_bies
23-03-2004, 05:45
Oleg,

I was trying the last 2 version ( samba-2.2.8).
I could give it a try with the last samba-1.9.18p8 version or the one like the netgear WGT634

Is the soft for the netgear already released? than maybe it is possible to copy/extract it from that box.

Oleg
23-03-2004, 07:06
Yes, the firmware is available on the Netgear site. As for extracting - yes you can do that.

erik_bies
29-03-2004, 20:33
Hi Oleg,

May I ask how did you find the offset in the netgear img file.
I'm trying to mount it, but it continues to give errors. I must have the offset of the jffs2 filesystem wrong.

Any suggestion?


BTW. compiling the 1.9.16 version gives similar errors. I don't know how they managed.

Oleg
30-03-2004, 09:58
Offsets a determined as follows - open the file in hex viewer. find the name piggy - this is compressed linux kernel and a few bytes before there is a gzip magic. One you've extracted the kernel using the dd an decompressed it, compress it again with -9 flag. You will get the compressed kernel size. With hex viewer look at the location after the kernel in the original image. You need to find the magic for fs. If I recall correctly there is a gap filled with 0xff in the netgear firmware and this gap is ends at 0x140000 there jffs2 lies (the first bytes is the jffs2 magic).
Decompressing jffs2 is not a trivial task. You need to create mrd device in ram (mtdram) copy the contents of jffs2 image to it and then mount it.

rwhitby
07-04-2004, 13:52
Originally posted by justwords
Seems that the new netgear WGT634 has samba and usb 2.0 built in! So you can access usb-disks from every program.


http://www.netgear.com/products/details/WGT634U.php?view=hm

Does anyone know if this unit has accessible serial ports like the WRT54Gv2 or the Asus WL-500G ?

I really want a linux-based router that has USB 2.0 and two serial ports. Anyone know of one ?

-- Rod

Styno
07-04-2004, 14:24
The Asus doesn't have USB 2.0, but the serial ports can be added using a USB hub and USB to RS232 converters...

rwhitby
07-04-2004, 14:35
Originally posted by Styno
The Asus doesn't have USB 2.0, but the serial ports can be added using a USB hub and USB to RS232 converters...

Do you have details of which USB to RS232 converters the Linux kernel will recognise ? And in particular, will the linux kernel recognised an external modem connected to the USB to RS232 converter?

-- Rod

Styno
07-04-2004, 14:51
I don't have any experience with USB to RS232 converters with Linux. But I've succesfully tested an ACM compatible (very important) USB modem with Slackware a few months ago. So, if you want to use the serial port to connect with an analog modem you can look for and ACM compatible USB modem instead.

There's just one big IF, which is support for ACM modems in the router firmware. I suppose its not included by default.

Antiloop
07-04-2004, 15:14
Originally posted by rwhitby
Does anyone know if this unit has accessible serial ports like the WRT54Gv2 or the Asus WL-500G ?

I really want a linux-based router that has USB 2.0 and two serial ports. Anyone know of one ?

-- Rod

this has nothing to do with the Samba topic, for serial please refer to http://wl500g.info/showthread.php?s=&threadid=233&highlight=serial

the wl500g does not support usb2.0, you should look for the Netgear model that does support USB2.0 don't know further details of it... ( www.netgear.com )

rwhitby
07-04-2004, 21:57
Originally posted by Antiloop
this has nothing to do with the Samba topic, for serial please refer to http://wl500g.info/showthread.php?s=&threadid=233&highlight=serial

the wl500g does not support usb2.0, you should look for the Netgear model that does support USB2.0 don't know further details of it... ( www.netgear.com )

Actually, in my original post I was asking about the Netgear WGT634.

Does anyone else know if the Netgear WGT634 (and this is the only place on this forum where it has been mentioned) has accessible serial ports ?

-- Rod

Pirat
13-04-2004, 08:27
Hi!

Is there something new about Samba @WL-500g??

erik_bies
13-04-2004, 21:49
Nah, nothing new yet.

I'm away from my Linux box for a couple of weeks so I cannot try to extract the samba executable from the netgear box.

Compiling the source code continues to give errors, or at least when trying to execute it, I get a segmetation error.

I'll continue to try to get it to work when I'm back home, as I really want to switch off my old router/server

Anyway, give it a try yourself if you find the time and let us know

Later,

erik_bies
17-05-2004, 22:58
Yes!!

I got it to work. I have Samba running on the thing. I can access files via windows shared drive. Somehow the netbios name service is not yet ok, so I only can access it with \\IP\sharename

I'll attach my working config & files after I did a bit of cleanup if people are interested.

The transfer speed is actually faster than I expected. a 10MB testfile was transfered in less than 18sec, though this is slighly lower than the speed with FTP (15 sec for the same file)

http://www.zeilfreaks.nl/samba.png

Pirat
18-05-2004, 05:05
Cool!!!!!!!!!!!!!!!!!!!!!!!

Styno
18-05-2004, 08:41
Good job! Its a great feature when using the router as a LAN fileserver.

I Guess you're running/booting from USB HD/Flash? How large is your boot image, I mean, would it be possible to fit it into the internal Flash?

It's a pitty the transferrate of the USB bus is just 11 Mbps...

Antiloop
18-05-2004, 09:11
we are already testing samba which is integrated in the firmware

things are accesible throught //WL500G/share as read only
and as //WL500G/share$ as read/write

performances are not that great, also copying and playing mp3's files results in a locked up wl500g at this moment

Pirat
18-05-2004, 20:20
Hi!

If Samba is running on my WL-500g, there is only one thing I need: a eMule-Client with Web-Interface running on WL-500g. Then it is not needed to let the PC powered on. :D :D :p :p

erik_bies
18-05-2004, 21:44
@antiloop

Which version do you plan to integrate? 1.9.18 ? or did you manage to compile the v2 or v3 series?

Antiloop
19-05-2004, 00:35
credits should go to Oleg :D

at this moment we are testing with version 1.9.17p5

but at this moment i'm suffering with too much used memory and resulting in dropping services

e.g. turning off webcam does miracles :rolleyes:

but playing mp3's from 5 pc's goes fine, with no lockup
still have to check the write thing why it locks up when playing&writing at same time..

Oleg
19-05-2004, 11:11
@antiloop

Which version do you plan to integrate? 1.9.18 ? or did you manage to compile the v2 or v3 series?
The 1.9.17p5 is the last samba with reasonable executable sizes. Also, forget of running samba with multiple clients, USB bandwidth is very low for this. Samba for the wl500g is mostly technology demonstration, not the working product. So, Samba will be mostly unsupported.

Pirat
19-05-2004, 12:39
@erik_bies:
Which Samba Version have you in use?
Can you post the binarys?
Have you the same problems like Oleg and Antiloop??

More infos please!!!!!!

erik_bies
19-05-2004, 22:44
@erik_bies:
Which Samba Version have you in use?
Can you post the binarys?
Have you the same problems like Oleg and Antiloop??

More infos please!!!!!!

Yep, can do.... see attached. Note it is work in progress, but works for me @ the moment The attached version is 1.9.17.

Few things I did to get it to work...drop the files in a directory.
1) add "WL500g" to the /etc/hosts
2) create directory /usr/local/samba and drop there the smb.conf
3) edit the smb.conf to have your network (and not mine, as it is currently :) )
4) Start the netbios naming: ./nmbd
5) start the network drive ./smbd

in windows open \\Asuswl500g\WL500gShare (or different if you changed the naming in the config file)

I did not experience the lockups, I've been stressing it only with 2 clients attached, 1 downloading lots of files, the other one playing some MP3's. The playing was not interupted or anything.
But keep in mind that I don't run a webcam, and I don't have any RAM drives (ramfs) all running from disk (see the how-to section), so maybe it is a memory problem that's causing the lockups.

Regarding the speed... well, yes it is not flying. But I currently use as "fileserver" a linux box running on an old P133 so the difference is not huge :)
For me it serves the purpose when I once in a while wanna transfer some files without the hassle of copying them to CD, and to keep some install files.

Anyway give it a try, and see for yourself if it is worth it.....

I guess that Oleg will be able to compile the files in his firm without the -static flag, but I'm still struggling with the linking. Also I did not 'strip' the executables.

Pirat
20-05-2004, 11:59
Hi!

Thanks for the bin.
I have installed the rootfs, boot from HDD and copy the folder /usr/local/samba
Then I start ./nmbd and ./smbd. Then I type ps -ef to show the running processes and smbd is not running.
What can I do??

How can I disable the ramfs?? I tryed to remark "mount /ramfs ......." in /init/boot, but then the router dosnt boot!
Can you help me??

Pirat
21-05-2004, 00:06
OK, Samba is running.
There are only 4 problems:
How change /etc/hosts permanetly
How make users??
How to change the path?
How disable ramfs?

erik_bies
21-05-2004, 22:07
@pirat


1) I guess, when you sucessfull in switching of the ramfs, making the host file changes won't be difficult. Otherwise a solution might be to add to the startup scripts something like

echo "192.168.1.1 my.router my.WL500g WL500g" > /etc/hosts

2) I believe there are 2 ways, 1 is adding an Unix user, use Oleg's full busybox, and execute "./busybox adduser". Alternatively, you can use a samba user file, locate it in /usr/local/samba/private, file name is smbpasswd. You might need to create it on another box running linux (Hi knoppix....)

3) What ya mean with change the path. You can create shares with different path with the smb.conf file.

4) disable ramfs... edit /init/boot. see http://wl500g.info/showthread.php?t=359

Pirat
22-05-2004, 09:47
echo "192.168.1.1 my.router my.WL500g WL500g" > /etc/hosts
I make this workaround befor I write my question. :D
Now I have disabled ramfs (I have tryed befor but forgot to remount / :D)
I mean the $PATH.

~ # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
~ #
I would add /script cause I have some small scripts in this directory.

I'll test the full busybox.
Thank you!

Pirat
22-05-2004, 13:10
Where can I find full busybox???

Chemist
03-06-2004, 12:36
OK, I had some problems (http://wl500g.info/showthread.php?t=456) with the CR5 release, but they are cleared up and even samba is running smoothly :)
However, I have another question regarding the Samba functionality.
I have 2 external harddrives and I wonder if it is possible to use them at the same if I use an USB hub. I tried this with ftp in the original firmware but I was ubable to connect to the second hardrive. Can I do this with Samba and if so, what changes should I make ? (I guess some additional bootCmd's and a modification in the smb.config file?)

Technik
03-06-2004, 15:22
OK, I had some problems (http://wl500g.info/showthread.php?t=456) with the CR5 release, but they are cleared up and even samba is running smoothly :)
However, I have another question regarding the Samba functionality.
I have 2 external harddrives and I wonder if it is possible to use them at the same if I use an USB hub. I tried this with ftp in the original firmware but I was ubable to connect to the second hardrive. Can I do this with Samba and if so, what changes should I make ? (I guess some additional bootCmd's and a modification in the smb.config file?)
You have to mount the second HDD first, then to add another share to smb.conf.
Example:


cd /tmp
mkdir hdd2
mount /dev/discs/disc1/part1 /tmp/hdd2


edit smb.conf to add share:
[hdd2]
path = /tmp/hdd2

Okoun
27-07-2004, 11:45
I'd like to use samba as WINS server, I don't need to share anything. I've seen so many success stories, but I just couldn't make samba run myself at all. I searched everywhere, but I don't know where the problem is.

when I execute:

smbd -D
nmbd -D

Nothing happens, ps doesn't show samba running.
If I could at least get some kind of an error message that would tell me whats wrong, but this way I don't have a clue :-(

I tried chaning /etc/smb.conf according to some howtos on the net, but samba refuses to be interactive.

I'm using 1.7.5.9-3 firmware.

Any suggestions?

Styno
27-07-2004, 13:15
Have you tried to set the firmware to 'default settings' (via the admin website) before you tried to enable Samba?

For me, resetting to default settings, this was the solution to getting Samba running. Good luck.

Oleg
27-07-2004, 15:35
I tried chaning /etc/smb.conf according to some howtos on the net, but samba refuses to be interactive.

I'm using 1.7.5.9-3 firmware.

Any suggestions?
For WINS you need to run nmbd only. Log files are named /var/log/nmb & /var/log/smb. Also, you need to specify hostname in the IP settings. Without this it will not work.

Brearich
05-08-2004, 23:01
@pirat


1) I guess, when you sucessfull in switching of the ramfs, making the host file changes won't be difficult. Otherwise a solution might be to add to the startup scripts something like

echo "192.168.1.1 my.router my.WL500g WL500g" > /etc/hosts

2) I believe there are 2 ways, 1 is adding an Unix user, use Oleg's full busybox, and execute "./busybox adduser". Alternatively, you can use a samba user file, locate it in /usr/local/samba/private, file name is smbpasswd. You might need to create it on another box running linux (Hi knoppix....)

3) What ya mean with change the path. You can create shares with different path with the smb.conf file.

4) disable ramfs... edit /init/boot. see http://wl500g.info/showthread.php?t=359

Hi all
as a complete newbie, i've been able to upgrade to Firmware 1.7.5.9-3, and through trial and error I've got running an external USB 40GB HDD (in a USB 2 generic box) with samba, and have 4 shares (1 read only), but I can only get access as the admin user. I'm using Mac OS X 10.3.4 and can ftp happily to the USB drive with Transmit ftp. I've looked into the above quoted message to add extra users (I have two OS X machines - a powerbook and an iBook - that I want to share this HDD) and busybox does not have the adduser option, and as for the other option - I would not know where to start. I could live with both machines logging in as admin, however, it would be much better to have admin plus two user accounts. Any help/pointers greatly received.

PS I bought the router because of it's advertised Disk and Printer sharing, but never knew I could do so much with it - great work!

Styno
22-08-2004, 19:09
A WIKI page on Samba installation/configuration can be found here: http://wiki.wl500g.info/index.php/PackageSamba

Okoun
10-12-2004, 23:43
I am sorry to open this discussion again. Samba runs fine with Oleg's firmware when one follows the wiki page correctly, but I had to move to OpenWrt firmware (I needed ospfd badly)

Now I miss Samba quite a lot there. When I try to copy nmbd from Olegs firmware and copy it by FTP to my OpenWrt it just gives this error after execution:
Bus error.

I tried to upload via FTP the compiled file on the wiki page. However that samba acts a bit differently than the one in Olegs firmware. Mostly the default path for logs and confs is different, but I was able to manage that.

Now, I use the sam conf file as before, nmbd runs as a deamon, it becomes browse master, but the clients are unable to get the browse list from that samba.

So I am wondering why is it not possible to take the binary from Olegs firmware and put it to OpenWrt? I think the downloadable compiled version on Wiki page is buggy, but Olegs is fine. Could someone recompile the samba for me please? I'd really like a working browse master server, because there are some people in my network who become browse masters, but have their firewall configured badly and so browsing get broken now and then. Working nmbd could fix this in a second.

any help is very appreciated

Styno
11-12-2004, 00:25
I don't think that will work as openwrt uses probably different uClibs. I bet you'll have to recompile it for openwrt yourself.... Perhaps openwrt kernel also misses the USB stuff, so you'll have to compile that in too.

Oleg will be able to tell you more about it...

Okoun
11-12-2004, 00:45
I was just amazed that the binary on wiki pages can be executed on OpenWrt fine, only catch is that it doesn't work properly, but I think that this version wouldn't work correctly even under Oleg's fw.

Oh, I forgot to mention that I use modded OpenWrt by jaha2x for Asus 500b/g which has USB support and stuff :p
http://puma.spojovaci.net/~jaha2x/wl500/openwrt/
the list of present libraries is at the bottom of the page

Compiling is what I am afraid of :) I'll need a step-by step help here. Oleg, can you advise me? Thanx

From the log od the precompiled samba I can see this:
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.90 for name JNET<0x1b>
Name query from 10.107.3.77 for name JNET<0x1d>
OK 10.107.3.65

JNET is workgroup
IP 10.107.3.90 has WinXP
IP 10.107.3.77 is another Samba

looks like this precompiled samba is really broken. The one in olegs fw was OK.

Oleg
11-12-2004, 09:45
Which custom firmware you've used before?
Yes, binaries from custom firmwares will not run with openwrt - they're using different uclibc version.

Okoun
11-12-2004, 10:38
I used almost every one you made :)

The one I had there previously was 1.7.5.9-5, then I moved to OpenWrt. I dont know what uclibc is, but if you tell me what command should I type on a linux box to compile the samba for OpenWrt, I would be very grateful.

Oleg
11-12-2004, 12:04
Well, you can grab 1.7.5.9-5 sources and check the Makefile. It contains everything you need. Just check for target called samba.
At the moment I do not have openwrt toolchain compiled, so can't compile it for you.
You could probably ask jaha2x to compile samba using stuff from this Makefile.

Lionking
23-01-2005, 20:16
I used almost every one you made :)

The one I had there previously was 1.7.5.9-5, then I moved to OpenWrt. I dont know what uclibc is, but if you tell me what command should I type on a linux box to compile the samba for OpenWrt, I would be very grateful.

Did you find a solution running samba under OpenWrt ?