Author Topic: Samba Over Wi-fi?  (Read 17440 times)

lpetroni

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Samba Over Wi-fi?
« on: August 13, 2005, 10:30:16 pm »
Hi,

I would like to sync/transfer files from my Mac and Z using a samba shared folder and would like to do this over wi-fi. Next I will try to use ZMacSync over WiFi.

So far I can get my Z to recognize my CF WiFi card and I can pick up an IP address from my DHCP server. I connect to my DHCP server thru an wifi AP that is hardwired to the DHCP server.
I can surf the web, get email and connect to my Mac's Personal Web Server.

But I can not connect from my Mac to the Z be it with Samba or FTP.

So my questions are (be aware that I don't know anything about Linux):

1. How can I check if Samba is running?
2. Do I need to have a fix IP address or can I use a dynamic one as I'm doing currently?

I found an article in ZUG which has a listing with a lot of commands and adjustments to configure Samba over WiFi - is all that programming necessary?

Thanks in advance!
Zaurus SL-5500
Cacko/CrowROM (64/0)

PQI 4GB CF
Lexar 128MB SD
Sandisk 256MB CF
Trellis WiFi CF

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
Samba Over Wi-fi?
« Reply #1 on: August 13, 2005, 10:42:02 pm »
Quote
But I can not connect from my Mac to the Z be it with Samba or FTP.

So my questions are (be aware that I don't know anything about Linux):

1. How can I check if Samba is running
Open a terminal (e.g. ssh or using a local terminal). Type ps -ef and watch out for "smbd"
Quote
2. Do I need to have a fix IP address or can I use a dynamic one as I'm doing currently?

I found an article in ZUG which has a listing with a lot of commands and adjustments to configure Samba over WiFi - is all that programming necessary?
Unfortunately, yes.

The Samba server "smbd" is configured by Sharp so that it can be accessed only through the USB line. This is a security feature since otherwise, anybody would be able to insert any code (virus, trojan horse, spyware, ...) into your PDA. USB is seen to be an interface where you need to have "local" access to the device. So it is more protected.

There are a lot of commands to issue to configure the smbd differently so that it reacts on other access methods like WLAN.

To copy files, I usually recommend to either use the USB cable or a memory card. Or make a tar package, send over ssh and unpack. This could look like (commands issued in a Mac Terminal!):
Code: [Select]
(cd /someDirectoryOnYourMac; tar czf - filesToSend) | ssh root:password@192.168.129.201 sh -c "(cd /destinationDirectoryOnZaurus && tar xvzf -)
Unfortunately, this also copies the Resource forks of files to the Zaurus and I have not yet found an option to switch that off.

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

lpetroni

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Samba Over Wi-fi?
« Reply #2 on: August 14, 2005, 05:56:56 pm »
Quote
Open a terminal (e.g. ssh or using a local terminal). Type ps -ef and watch out for "smbd"

hns,

I installed embeddedkonsole. I open it and get a prompt like:

Code: [Select]
bash-2.05$

In this prompt I tried ps -ef or ps -A
I received a long list with lots of information. The header has PID / TIY / TIM / CMD.

In this list I found a lot of CMDs (?) like:
init
keventd
swapper
bdflush
sdmgr
qeserver
addressbook
...

I suppose these are the processes that are running in my Z, right? But I did not find anything like smbd or even closer to this.

Does this mean that Samba is not running by default in my recently flashed SharpROM v3.13?  
Zaurus SL-5500
Cacko/CrowROM (64/0)

PQI 4GB CF
Lexar 128MB SD
Sandisk 256MB CF
Trellis WiFi CF

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
Samba Over Wi-fi?
« Reply #3 on: August 14, 2005, 07:43:10 pm »
Quote
I suppose these are the processes that are running in my Z, right? But I did not find anything like smbd or even closer to this.

Does this mean that Samba is not running by default in my recently flashed SharpROM v3.13? 
Yes, these are the processes running on the Z. You can also try to run "ps -ef|fgrep smb" to find if anything looks like SMB.

I have just tested what is changing when plugging in the USB interface: The processes "smbd" and "nmbd" are started. On unplugging they are cancelled. So, you won't see them unless you use USB or change the SMB configuration files .

To check if they are available, type "which smbd". It should say "/usr/sbin/smbd".

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

lpetroni

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Samba Over Wi-fi?
« Reply #4 on: August 16, 2005, 11:08:06 am »
Quote
I have just tested what is changing when plugging in the USB interface: The processes "smbd" and "nmbd" are started. On unplugging they are cancelled. So, you won't see them unless you use USB or change the SMB configuration files .

To check if they are available, type "which smbd". It should say "/usr/sbin/smbd".

hns,

That's it! Followed your suggestion and Samba starts when you plug the Z in the cradle and ends on upplugging. As I'm not confortable to change my SMB configuration files yet I'll follow your other suggestion and start with an USB connection.

Thanks!
Zaurus SL-5500
Cacko/CrowROM (64/0)

PQI 4GB CF
Lexar 128MB SD
Sandisk 256MB CF
Trellis WiFi CF

Mac

  • Newbie
  • *
  • Posts: 36
    • View Profile
Samba Over Wi-fi?
« Reply #5 on: February 24, 2006, 10:39:56 am »
enabling smb over wifi is quite easy; have a look at meanie his site  

Quote
To allow Samba to be accessed via the WLAN (wlan0, wifi0) or LAN (eth0) interface, edit the following file: /usr/lib/samba/smb.conf

Find the following line: interfaces = usbd0

add your network interface after usbd0 separated by a space like this: interface = usbd0 wlan0 eth0

for security reasons; change the root and zaurus user's password
C3000 Sharp ROM
Dlink wifi - Belkin usb2lan
Billionton cf ethernet
512 mb SD

www.dinozaurus.com

ralphrmartin

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Samba Over Wi-fi?
« Reply #6 on: February 27, 2006, 03:51:52 am »
Quote
I would like to sync/transfer files from my Mac and Z using a samba shared folder and would like to do this over wi-fi.

I found this to be a pain. Much simpler is to install openssh, and then use Fugu do transfer files by sftp.

Mac

  • Newbie
  • *
  • Posts: 36
    • View Profile
Samba Over Wi-fi?
« Reply #7 on: February 27, 2006, 05:35:14 am »
exactly how I do it, fugu to the rescue !

(and there is an error in accesing the zaurus over smb, the disc only has 2 mb left...)
C3000 Sharp ROM
Dlink wifi - Belkin usb2lan
Billionton cf ethernet
512 mb SD

www.dinozaurus.com

zeigerpuppy

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Samba Over Wi-fi?
« Reply #8 on: July 02, 2007, 05:48:46 am »
Found a way to stop OS X writing .DS_Store files to samba shares.
(this fixed a problem when adding files to a mounted vfat partition)


Open a terminal in OS X 10.4.x, then type:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

then reboot.
Zaurus C3100, CE-RH2, Socket lowpower CF Wifi, Socket CF Bluetooth
pdaXrom r198 - testing!, IceWM, Bluetooth modem: Sony Ericsson v600i with 3G.
see some howtos and tips at http://greenant.net/portal/greenant/wiki/Zaurus3100

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Samba Over Wi-fi?
« Reply #9 on: July 02, 2007, 12:19:26 pm »
Aha! What problem did it solve?
I sometimes have a problem that Mac OS says there's not enough space on the share, although there is. I haven't looked into it deeply enough to know if it has to do with existent or non-existend .DS_Store files, but it could be.
But strangely, sometimes it worked and sometimes it didn't.

Will try your fix tonight!

thanks
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
Samba Over Wi-fi?
« Reply #10 on: July 03, 2007, 02:17:42 am »
Quote
I sometimes have a problem that Mac OS says there's not enough space on the share, although there is. I haven't looked into it deeply enough to know if it has to do with existent or non-existend .DS_Store files, but it could be.
No, that is a different bug.

Finder does not go into subdirectories to get the free space of the volume. And the Samba daemon on the Zaurus tells the volume size of /home/samba which is always the Zaurus internal flash. So, even if you insert a CF or SD card with plenty of space, Finder thinks there is only the free space of the internal flash.

Solution: unknown

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

zeigerpuppy

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Samba Over Wi-fi?
« Reply #11 on: July 04, 2007, 08:08:10 am »
Quote
Quote
I sometimes have a problem that Mac OS says there's not enough space on the share, although there is. I haven't looked into it deeply enough to know if it has to do with existent or non-existend .DS_Store files, but it could be.
No, that is a different bug.

Finder does not go into subdirectories to get the free space of the volume. And the Samba daemon on the Zaurus tells the volume size of /home/samba which is always the Zaurus internal flash. So, even if you insert a CF or SD card with plenty of space, Finder thinks there is only the free space of the internal flash.

Solution: unknown

-- hns
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164208\"][{POST_SNAPBACK}][/a][/div]

This is solved by setting your share to a subdirectory of the partition you are using.
I do /mnt/ide3/Documents
Then the size is correctly reported
Zaurus C3100, CE-RH2, Socket lowpower CF Wifi, Socket CF Bluetooth
pdaXrom r198 - testing!, IceWM, Bluetooth modem: Sony Ericsson v600i with 3G.
see some howtos and tips at http://greenant.net/portal/greenant/wiki/Zaurus3100

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Samba Over Wi-fi?
« Reply #12 on: July 04, 2007, 11:05:07 am »
Is there some option in Samba to prevent the available space calculation in advance (i.e. when copying over Samba, the source computer should not check for available space, but rather begin to copy and only stop when the target reports "no space left")?
Such a mechanism would fix the problem.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0