Samba Access

From WebOS Internals

Revision as of 16:56, 22 July 2009 by Hopspitfire (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document is still a work in progress, as once the installation is complete you will have access to your Pre via your home network but it will disable audio i am still in the process of locating why this happens. But this is a great way to just drag and drop files from your Pre to your PC without having to load up a FTP client.

There have been reports of losing the ability to download apps from the App Catalog. Use at your own risk.

Note: Run this in developer mode at first, if you are not in developer mode this will not work properly.

Step 1: Login to your rooted Pre

Step 2: Remount your Pre with read/write permissions

sudo mount -o remount,rw /

Step 3: Install the needed components from ipkg-opt

sudo ipkg-opt update
sudo ipkg-opt install samba

^^The following packages are installed with Samba: popt, readline, openldap-libs, openssl, libdb, gdbm, cyrus-sasl-libs^^

Step 4: Create/Edit Samba's configuration file

sudo vi /opt/etc/samba/smb.conf

Step 5: Use the following configuration file.

#Samba 3.2.12-1 from ipkg
#configuration file for Palm Pre WebOS 1.0.3

[global]
        workgroup = WORKGROUP
        server string = PalmPre Samba
        security = SHARE
        smb passwd file = /opt/etc/samba/smbpasswd
        encrypt passwords = yes
        guest account = nobody
        bind interfaces only = yes
        config file = /opt/etc/samba/smb.conf
        log file = /var/log/samba.%m
        socket options = IPTOS_LOWDELAY TCP_NODELAY
        interfaces = eth0, lo
        debug level = 1
        max log size = 10
        load printers = no
        domain master = no
        local master = no
        prefered master = no
        domain logons = no
        wins support = no
        wins proxy = no
        dns proxy = no

[tmp]
        comment = Temporary File Space
        path = /tmp
        read only = yes
        guest ok = yes
        public = yes
        create mask = 0744
        available = yes
        browseable = yes

[root]
        comment = PalmPre Root Directory
        path = /
        read only = no
        browseable = yes
        guest ok = yes

^^This is a basic configuration file i used, and it works out quite well: also a side note, Nano is much easier to work with then Vi i would suggest grabbing that package as well^^

Step 6: Add you a user to the system for sharing purposes. (where username = your account name)

sudo /opt/bin/smbpasswd -a username

Step 7: Change the samba service to activate for testing.

sudo vi /opt/etc/init.d/S08samba

Change:


#!/bin/sh

# set samba_active=1 to activate samba
samba_active=0

To:

#!/bin/sh

# set samba_active=1 to activate samba
samba_active=1

Step 8: Test if Samba is functioning properly

sudo /opt/etc/init.d/S08samba

Step 9: set your system back to default read only state

sudo mount -o remount,ro /

Because i have not figured out why we lose audio when this is installed the following is not recommended.

UpStart for Samba.

description "Samba Daemon for WebOS"
version 1.0

# don't start until the WebOS finishes it's normal boot
# that way no delay is added to the GUI startup
start on stopped finish
stop on runlevel [!2]

# don't try to log any output
console none

# -D sets smbd & nmbd to act as a daemon
exec /opt/sbin/smbd -D
exec /opt/sbin/nmbd -D

pre-start script
        # Add firewall rule to make sure we're not blocking anything
        # This will only be available via eth0 (wifi)
         /usr/sbin/iptables -I INPUT -i eth0 -p udp --dport 137 -j ACCEPT
         /usr/sbin/iptables -I INPUT -i eth0 -p udp --dport 138 -j ACCEPT
         /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 139 -j ACCEPT
         /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 445 -j ACCEPT
end script

^^This has not been tested fully as with audio being out, i didn't bother to test it more but the samba portion works as intended^^

Credits go out to everyone who taught us how to root the pre's as well as the fine folks who got us optware-feeds!

Personal tools
Google AdSense