Update

Awesome notes up here:

http://signalblue.com/iphone/

on how to actually use this stuff :)


SAMBA on iPhone 

only do this if you know what you are doing, this could expose 
all your data to the bad guys (tm)


On the iphone after making a suitable smb.conf in /usr/local/samba/lib/ 
and after a smbpasswd setup:

sh-3.2# ps aux | grep smb
root   678   0.0  0.0   263760    240  p1  R+    8:08PM   0:00.01 grep smb

Start daemons:

-bash-3.2# smbd -D
-bash-3.2# nmbd -D
-bash-3.2# ps aux | grep mb
root   680   0.0  0.0   277392   1120  ??  Ss    8:08PM   0:00.19 smbd -D
root   681   0.0  0.0   277392    272  ??  S     8:08PM   0:00.01 smbd -D
root   683   0.0  0.0   274744    488  ??  Ss    8:08PM   0:00.01 nmbd -D


Back on imac, or pc client we can list the services:

[imac:~] % smbclient -L iphone -Uroot
Password: 
Domain=[JAMES'S IPHONE] OS=[Unix] Server=[Samba 3.0.25c]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (Samba Server on iPhone)
        root            Disk      Home Directories

Domain=[JAMES'S IPHONE] OS=[Unix] Server=[Samba 3.0.25c]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        IPHONES              JAMES'S IPHONE



After mounting via finder:



(currently only root is allowed to login due to GID/UID issues)


However it works rather well:

[imac:~] % ls -ltra /Volumes/
Macintosh HD@ ramdisk/      iphoneroot/      


[imac:~] % ls -ltra /Volumes/iphoneroot/
total 570
drwx------   1 root  admin  16384 May 22 23:54 cores
drwx------   1 root  admin  16384 Jul 23 19:04 Library
drwx------   1 root  admin  16384 Aug 11 01:02 private
drwx------   1 root  admin  16384 Aug 11 01:34 sbin
drwx------   1 root  admin  16384 Aug 11 01:34 libexec
drwx------   1 root  admin  16384 Aug 11 01:34 System
drwx------   1 root  admin  16384 Aug 11 11:15 home
drwx------   1 root  admin  16384 Aug 11 16:56 usr
drwx------   1 root  admin  16384 Aug 12 16:25 Users
drwx------   1 root  admin  16384 Aug 12 16:42 iphoneperl
drwx------   1 root  admin  16384 Aug 18 18:04 var
drwx------   1 root  admin  16384 Aug 21 17:39 dev
drwx------   1 root  admin  16384 Aug 22 00:27 Applications
drwx------   1 root  admin  16384 Aug 22 17:08 etc
drwx------   1 root  admin  16384 Aug 22 17:24 bin
drwx------   1 root  admin  16384 Aug 22 20:08 tmp
drwxrwxrwt   6 root  admin    204 Aug 22 20:10 ..
drwx------   1 root  admin  16384 Aug 22 20:10 .
-rwx------   1 root  admin  12292 Aug 22 20:10 .DS_Store


Reading and writing works:

[imac:~] % cd /Volumes/iphoneroot/tmp

[imac:/Volumes/iphoneroot/tmp] % ls
-T0x2846480.tmp.1AI241  -T0x2846480.tmp.KDCRSO  MediaCache              launchd
-T0x2846480.tmp.3s94SE  -T0x2846480.tmp.ZsX60h  UpdatedSnapshots

[imac:/Volumes/iphoneroot/tmp] % touch hello
[imac:/Volumes/iphoneroot/tmp] % echo test > hello
[imac:/Volumes/iphoneroot/tmp] % cat hello
test
[imac:/Volumes/iphoneroot/tmp] % rm hello
[imac:/Volumes/iphoneroot/tmp] % cat hello
cat: hello: No such file or directory

Looks like this in the GUI: