Samba is an implementation of the Windows SMB protocol (which allows you to access devices over your network). This allows you to see your iDevice files over your WiFi networks with no additional software required on your computer.
While SMB was made by Microsoft, Samba ports exist for Linux, Mac OS and tons of other OSes so you can access your device from all of those as well.
The current default configuration for Samba on iOS gives you read-only access to most of the file system and write access to an empty storage directory. This is actually done to prevent accidental damage (it’s easy in Windows Explorer to move a directory from one place to the other by accident). If you want more control over the sharing I highly recommend reading about Samba and how to configure it to do what you want (the configuration file resides in /etc/samba/smb.conf).
This port should was tested on iOS 3 and 4 (iOS 5 will be supported when it’s out).
How to install Samba on your Apple TV2:
run : wget http://apt.saurik.com/debs/samba_3.2.7-4_iphoneos-arm.deb
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
AppleTV:~ root# wget http://apt.saurik.com/debs/samba_3.2.7-4_iphoneos-arm.deb --2011-12-27 21:14:36-- http://apt.saurik.com/debs/samba_3.2.7-4_iphoneos-arm.deb Resolving apt.saurik.com... 74.208.10.249 Connecting to apt.saurik.com|74.208.10.249|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://cache.saurik.com/debs/samba_3.2.7-4_iphoneos-arm.deb [following] --2011-12-27 21:14:37-- http://cache.saurik.com/debs/samba_3.2.7-4_iphoneos-arm.deb Resolving cache.saurik.com... 174.35.64.44, 174.35.67.55 Connecting to cache.saurik.com|174.35.64.44|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 19043436 (18M) [application/octet-stream] Saving to: `samba_3.2.7-4_iphoneos-arm.deb' 100%[=======================================>] 19,043,436 509K/s in 37s 2011-12-27 21:15:14 (504 KB/s) - `samba_3.2.7-4_iphoneos-arm.deb' saved [19043436/19043436] |
Now install with : dpkg -i samba_3.2.7-4_iphoneos-arm.deb
|
1 2 3 4 5 6 |
AppleTV:~ root# dpkg -i samba_3.2.7-4_iphoneos-arm.deb Selecting previously deselected package samba. (Reading database ... 15662 files and directories currently installed.) Unpacking samba (from samba_3.2.7-4_iphoneos-arm.deb) ... Setting up samba (3.2.7-4) ... AppleTV:~ root# |
Test to see what version your smbd & nmbd has
|
1 2 |
AppleTV:~ root# smbclient --version Version 3.2.7 |
Find smb servers in your network
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
AppleTV:/usr/samba/bin root# perl findsmb Can't load /etc/samba/smb.conf - run testparm to debug it *=DMB +=LMB IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION --------------------------------------------------------------------- Can't load /etc/samba/smb.conf - run testparm to debug it 192.168.2.1xx WRT610N [ WORKGROUP ] Can't load /etc/samba/smb.conf - run testparm to debug it 192.168.2.10x BLACKARMOR [BLACKARMOR] [Unix] [Samba 3.0.34] Can't load /etc/samba/smb.conf - run testparm to debug it 192.168.2.10x MACBOOK-E3F1xx Unknown Workgroup Can't load /etc/samba/smb.conf - run testparm to debug it 192.168.2.11x WIRELESSSPACE +[WIRELESSSPACE] [Unix] [Samba 3.5.8] AppleTV:/usr/samba/bin root# |
Let’s see if I can login to my NAS
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
AppleTV:/ root# smbclient //192.168.2.10x/test -U admin params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": No such file or directory smbclient: Can't load /etc/samba/smb.conf - run testparm to debug it Enter admin's password: Domain=[BLACKARMOR] OS=[Unix] Server=[Samba 3.0.34] smb: (that works) smb: \>quit AppleTV:/ root# |
note, to remove samba :
apt-get remove samba
Next items I need to test, (seems to work for the iPhone) just noted not to forget..
Tags: client, samba, server, SMB, smbd, Wget