View Single Post
Old 04-13-2013, 05:02 PM   #1
joris_
Junior Member
joris_ has a complete set of Star Wars action figures.joris_ has a complete set of Star Wars action figures.joris_ has a complete set of Star Wars action figures.joris_ has a complete set of Star Wars action figures.
 
Posts: 7
Karma: 364
Join Date: Apr 2013
Device: Kobo Glo
[WIP] Samba share on the Kobo Glo (windows network share)

(this might work for other Kobo devices; I've only gotten it working on my own Glo)

Samba is an implementation of Windows networking features for Linux. With Samba, it's possible to create Windows network shares on Linux devices. I managed to get it running on my Kobo Glo, with a few limitations (no library update, no autostart). In this short guide, I'll show you how you can get it running as well.

NOTE: I literally got this working about an hour ago, using a random samba ARM build I found on the internet. Stability may be shitty, security may be awful, performance may be abysmal. Consider this your only warning

Prerequisites
-SSH access to your device

Step 1: download required files
1) grab an ARM build of Samba. I used the prebuilt Samba from BeyondLogic (via this wiki article) which you can download here.
2) Connect your device with your PC and copy the .tar.bz2 to the device's internal storage

Step 2: installing & configuring Samba
1) SSH to your device
2) Execute the following commands to extract Samba:
Code:
cd /mnt/onboard/
mkdir samba_test
cd samba_test
tar -xvzf ../samba-3.6.3-arm-none-linux-gnueabi.tar.bz2
3) create a 'logs' folder where samba server logs will be placed
Code:
cd /mnt/onboard/samba_test/var
mkdir logs
4) Link some required library files so that the samba server binary can start correctly by executing the following commands:
Code:
ln -s /mnt/onboard/samba_test/lib/libtalloc.so.2.0.5 /lib/libtalloc.so.2
ln -s /mnt/onboard/samba_test/lib/libtdb.so.1.2.9 /lib/libtdb.so.1
5) Create a Samba configuration file in /etc/smb.conf containing the following text:
Code:
[global]
workgroup = WORKGROUP
netbios name = SAMBA_FS
username map = /mnt/onboard/samba_test/var/username.map
smb passwd file = /mnt/onboard/samba_test/private/smbpasswd
private dir = /mnt/onboard/samba_test/private/
usershare path = /mnt/onboard/samba_test/var/locks/usershares
log file = /mnt/onboard/samba_test/var/logs/log.%m
pid directory = /mnt/onboard/samba_test/var/locks/
lock directory = /mnt/onboard/samba_test/var/locks/
cache directory = /mnt/onboard/samba_test/var/locks/
state directory = /mnt/onboard/samba_test/var/locks/
[onboard]
path = /mnt/onboard
browsable = yes
writable = yes
[root]
path = /
browsable = yes
writable = yes
This configuration creates two Samba shares: one points to the onboard 'public' storage (the one you can access via USB), the other points to the root of the filesystem. If you don't want to enable root fs access, just remove the 'root' group.
6) allow the root user to access Samba shares by setting its password:
Code:
/mnt/onboard/samba_test/bin/smbpasswd -a
(you'll be prompted to set a password for the root user; this password is only used for Samba, not for SSH, so make it anything you want)

Running Samba & testing
Now that Samba is configured, we can test it out!
1) Turn on Wireless on your Kobo device
2) Run /mnt/onboard/samba_test/sbin/smbd, either via SSH or by adding an smbd entry to your Kobo Tweaks .ini file
3) Navigate to \\<IP address of your device>\ using Windows Explorer or something else that can access Samba shares. You'll be prompted for a username/password, so enter the username 'root' and the password you set earlier.
If it doesn't work, check your wireless connection or look at the log file(s) in /mnt/onboard/samba_test/var/log.

That's it!

Last edited by joris_; 04-13-2013 at 05:05 PM.
joris_ is offline   Reply With Quote