OpenWrt Forum Archive

Topic: samba on openwrt

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi
I saw a big samba package in the tracker, which surely won't fit in my 4mb flash.
As you may have read in my previous post, I failed setting up the root fs in my usb hard drive in a loop fs.
But do you think I can simply mount /usr to the usb storage?
Are all ipkg made into /usr?

Thanks for your help.

To use the Samba package found on the tracker you need:
- Asus WL-500g / Asus WL-500g Deluxe and use this UsbStorageHowto or
- a WRT54 with the SD card mod

Than you have enough space to install the big Samba package.

(Last edited by olli_04 on 12 Jul 2005, 09:08)

Hi
I finally succeded in installing my rootfs on a HD.
I have white russian rc2.
Now samba package from florian repo seems not to work.
Here's what I did. Can someone check if I missed something?

I added a configuration file in /usr/lib/smb.conf
added smbuser in /etc/passwd and smbgroup in /etc/group

then I launched smbd -i
and  gives me the following error when I connect:

Failed to set gid privileges to (-1,5000) now set to (0,0) uid=(0,0)
smb_panic(): calling panic action [/usr/share/samba/panic-action 1220]
sh: /usr/share/samba/panic-action: not found
smb_panic(): action returned status 127
PANIC: failed to set gid

here is my /etc/group:

root:x:0:
smbgroup::5000:
nogroup:X:65534:

my /etc/passwd

root::0:0:root:/tmp:/bin/ash
smbguest:*:5000:5000:samba guest:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false

I googled a bit and found that this is a compilation time misconfiguration.
Is this an incompatibility with previous versions of openwrt?

Thanks for your help

[global]
  workgroup = WORKGROUP
  server string = %h server (Samba %v)
  wins support = no
  wins server = w.x.y.z
  dns proxy = no
  name resolve order = lmhosts host wins bcast
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  security = share
  encrypt passwords = true
  obey pam restrictions = yes
  guest account = smbguest
  invalid users = root
  passwd program = /usr/bin/passwd %u
  load printers = yes
  printing = cups
  printcap name = cups
  preserve case = yes
  short preserve case = yes
  interfaces = 192.168.0.10/24
[printers]
  comment = Imprimantes
  browseable = no
  path = /tmp
  printable = yes
  public = no
  writable = no
  create mode = 0700
  guest ok = yes

[print$]
  comment = Printer Drivers
  path = /samba/drivers
  browseable = yes
  read only = yes
  guest ok = no

[stockage]
       comment = Déposez ici petits fichiers et documents
       path = /samba/dossiers
       browseable = yes
       guest ok = yes
       writeable = yes

well, when I set guest account to root (guest account = root), samba started to work. I guess it is not very secure, but I will take the risk:-).

olli_04 wrote:

To use the Samba package found on the tracker you need:
- Asus WL-500g / Asus WL-500g Deluxe and use this UsbStorageHowto or
- a WRT54 with the SD card mod

Than you have enough space to install the big Samba package.

Or extract the package to an NFS share and symlink the appropriate files where needed. I have tons of stuff installed on my WRTs this way.

sophana wrote:

Hi
I saw a big samba package in the tracker, which surely won't fit in my 4mb flash.
As you may have read in my previous post, I failed setting up the root fs in my usb hard drive in a loop fs.
But do you think I can simply mount /usr to the usb storage?
Are all ipkg made into /usr?

Thanks for your help.

I ported Samba to OpenWrt. When I remember correctly, the ipkg package is less than 500 K. It's in CVS HEAD.
You can compile it in the SDK and you have a ready to use package for RC3.

where exactly is it? I searched both wiki and forum and did not find anything about such a smal package, only about the big one - which i then found via package tracker (and nothing else - I searched "samba")

It can be found here: http://openwrt.org/cgi-bin/viewcvs.cgi/ … h_tag=HEAD

Better is if you checkout CVS HEAD (see the OpenWrtFaq on the wiki) get the OpenWrt SDK (also described in the wiki) and copy the directory package/samba from the checkout into the SDK package dir.

Than you can compile it in the SDK and you have a package for RC3.

thank you bery much, this seems to be much better (not so resource-hungry)than the huge 3.10 version. However,since I am using p9100d for printing, is not it possible to run samba without cups installed? Now, when I try it, I get this:

/opt/usr/sbin/nmbd: can't load library 'libcups.so.2'
/opt/usr/sbin/smbd: can't load library 'libcups.so.2'

Samba package in HEAD has changed. The changes are: build shared daemons, add codepages, remove cups printing support.

You have to build your own IPKG package from CVS HEAD. Use the OpenWrt SDK for this if you don't like to build the full HEAD buildroot.

Untar the samba.tar.gz tarball in the package directory of the OpenWrt SDK and than follow the BuildingPackagesHowTo

EDIT: Samba 2.0.10 is working now. Thanks, Nico and also for thanks to Oleg.

(Last edited by olli_04 on 29 Sep 2005, 09:41)

samba packages (and others) have been updated in my HEAD testing repository.

can you tell about your samba performance?
I could reach less than 1mbyte/s over lan. I'm not sure if usb2 is the bottleneck or the network. (I used the debian samba server...)

(Last edited by sophana on 29 Sep 2005, 11:58)

sophana wrote:

can you tell about your samba performance?

Just transferd an ISO image to my USB-Stick (USB v2.0) connected to an Asus WL-500g Deluxe. With using the Samba package from Nico's link above and White Russian RC3.

I also get around ~ 1 MByte/s transferrate. The smbd process uses about 70% of the CPU power.

(Last edited by olli_04 on 29 Sep 2005, 15:04)

nico:thanks, it works great:-).

I usually got around 0,5 MB of transfer speed using either ftp or samba - however I got only USB 1.1 on my wl500g so in his case it may be the bottleneck, btu not in your case:-).

The discussion might have continued from here.