| 1   2   | Next
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Samba? (https://talk.maemo.org/showthread.php?t=2487)

Ceklund 2006-07-15 22:40

Samba?
 
There's a new set of programs centered around one 'Samba' available for install via the App Installer. So, I went to www.Samba.org to find out what it is, and it states:

Quote:

Originally Posted by Samba.org
As the front page at samba.org says, "Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients." Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients.

Samba-3 by Example explains further, saying:Samba is software that can be run on a platform other than Microsoft Windows, for example UNIX, Linux, IBM System 390, OpenVMS, and other operating systems. Samba uses the TCP/IP protocol that is installed on the host server. When correctly configured, it allows that host to interact with a Microsoft Windows client or server as if it is a Windows file and print server.

I still don't get it.... My question is does it allow us to print from our 770 or not?

Thanks.

troubleshootr 2006-07-15 23:07

Quote:

Originally Posted by Ceklund
There's a new set of programs centered around one 'Samba' available for install via the App Installer. So, I went to www.Samba.org to find out what it is, and it states:



I still don't get it.... My question is does it allow us to print from our 770 or not?

Thanks.

Print what? No applications in 2006 have print dialog. The only ones I know of in 2005 OS were Abiword and Jpilot. Perhaps you are looking for print from Xterm, then simple port of "lp" will allow this. Printing has been discussed before, it does not look promising.

gnuite 2006-07-16 00:09

Samba would be more important to the Nokia 770 as a means to mount remote Windows shares. Tools already exist for mounting NFS shares.

Hedgecore 2006-07-16 14:07

Funny, I just came here to find out about Samba after seeing it too. libpapm is mising when trying to install the client and i've got no idea what app rep it's from.

Hedgecore 2006-07-16 15:04

Ok so I was having issues refreshing my package list... checked the logs and it was the maemo.org reps that were down. I disabled them and the list refreshed, still none of the dependencies needed to install Samba.

This is what I was worried about with the new pkg based system... either there's some other repository that I don't know about because I've never been to the supporting web page, or they're just not there. Given that you can categorize apps, having multiple repositories for everything isn't the way to go...

konttori 2006-07-16 16:26

This is very interesting indeed. Finally an easy way to access home computers files. Well.. . if the installation would have all the dependencies that is. Hopefully it will have thise tomorrow when the folks at nokia go to worrk again.

Hedgecore 2006-07-16 17:14

Konttori: That's just it, I don't know which repository it's coming from (Well, it's not the maemo.org ones as I disabled them to allow refreshing of the pkg list (they're down and it was buggering up the refresh))

NokNok770 2006-07-16 17:32

That is stupid that the refresh won't work because one of the reppository is down. I hadn't been able to update since the 10th. I deleted all the reppository except the one you can't delete and it worked. I forgot that we can just disable it. Now ill have to enter them all back in. Why not just have one official reppository for everything.

Hedgecore 2006-07-16 17:58

Well, then who manages it, hosts it, etc. There's a pretty good list on maemo.org, though I agree; it's frustrating that one rep being down will screw up a refresh. Luckily there's the logs you can check to find out which the offending one is.

gnuite 2006-07-16 18:42

Quote:

Originally Posted by Hedgecore
Well, then who manages it, hosts it, etc. There's a pretty good list on maemo.org, though I agree; it's frustrating that one rep being down will screw up a refresh. Luckily there's the logs you can check to find out which the offending one is.

In my experience, if one repository is down, then it is only that repository that doesn't refresh (yeah, the wording in the error message is confusing). I remember updating the package list once, and one of the repositories was down, but the update still worked because I was able to update GPE-Calendar (without disabling any of the repositories).

And I agree, the more repositories the are, the more complicated it is going to be to satisfy dependencies. We shouldn't have to rely on every repository providing all of the dependencies for every application it contains. This is why I think all packagers should be trying to get their packages into one of the official maemo.org repositories.

gultig 2006-07-17 02:36

I'll back up gunite from personal experience in that it'll say that the whole update failed, while it was only the update of one repository that actually failed.

milen 2006-07-17 08:41

Quote:

Originally Posted by Hedgecore
... Luckily there's the logs you can check to find out which the offending one is.

I'll be gratefull, if you can point out, where those logs are.
Thank you in advance!

Milen

fanoush 2006-07-17 09:04

Quote:

Originally Posted by gnuite
Samba would be more important to the Nokia 770 as a means to mount remote Windows shares. Tools already exist for mounting NFS shares.

There is actually no need for samba for this. You only need cifs.ko kernel module to mount SMB/CIFS filesystem on N770. Then you can insmod it and write soemething like
mount -t cifs //x.x.x.x/share /localdir -o domain=x,user=x,password=x
in osso-xterm (as root). Works for me. Cifs module for IT2006 is here (copy and paste to URL bar, direct link would cause permission denied) http://fanoush.webpark.cz/maemo/cifs.tgz

ITom 2006-07-17 10:25

fanoush,
1. I got cifs.tgz, unpacked it (cifs.ko) and put to /lib/modules/ folder on Nokia. (modules folder created by me)
2. modprobe cifs.ko (modprobe: could not parse modules.dep)
3. depmode (depmod: Couldn't open directory /lib/modules//2.6.16-omap1/: No such file or directory)
4. mkdir 2.6.16-omap1
5. depmod (Nokia770-26:/lib/modules/2.6.16-omap1# ls
modules.dep) - 0 bite size
6. mount -t cifs //172.20.3.79/D$ /media/mmc1/Lan-Folder// -o codepage=cp1251,iocharset=utf8,username=administra tor,password=(***)
--- mount: Mounting //172.20.3.79/D$ on /media/mmc1/Lan-Folder failed: No such device

what wrong?
Thank You.

fanoush 2006-07-17 10:50

Use insmod with full module path, not modprobe.

ITom 2006-07-17 11:12

Thanks, working great!

Hedgecore 2006-07-17 23:03

Milen: Sure, open the application manager, click on the Application manager title bar, Tool, Log...

Also, I can't grab cfis.tgz...

* Correction: I can't grab cfis.tgz from the 770. Weird.

wiredless 2006-07-18 15:14

Sorry to be ignorant but how do you use samba once its installed. i have samba and samba client installed. Thanks in advance.

Hedgecore 2006-07-18 15:40

- - they're installed on your 770? (Are the dependencies fixed?)

To use Samba, you'd mount the share just like you'd mount anything else. Stay tuned for the experts to correct me but it'd be something like this:

mount -t smb //computername/sharename /mnt/mountpoint -o username=yourusername,password=yourpassword

/mnt/mountpoint is the directory you've created on your 770 where you'd like the network share to appear.

*** Also: I got the cifs module installed, however whenever I get an error telling me my mountpoint isn't in fstab... now I can add it, but I didn't think I'd need to. What gives?

ITom 2006-07-18 17:55

Hedgecore
Quote:

*** Also: I got the cifs module installed, however whenever I get an error telling me my mountpoint isn't in fstab... now I can add it, but I didn't think I'd need to. What gives?
Reply With Quote
You should be a root to make mount without fstab changing. fstab contain rules for mounting File Systems.
Look at my post before, it working. insmod /yourpath/cifs.ko But change your locale and iocharset if it necessary (i use cyrillic codepage)

Hedgecore 2006-07-18 19:09

iTom: I'm 99% I'd run gainroot, because I was still in the same shell that I had installed the kernel module from. I'll give it another shot tonight, I was rushed when I tried it before.

fpp 2006-07-18 21:57

Quote:

Originally Posted by fanoush
Use insmod with full module path, not modprobe.

Fanoush, thanks for this fantastic tip !
Easy and really fast too...
Now I never need to connect the USB plug or extract the MMC again :-)

NokNok770 2006-07-19 13:35

Could some experienced person make a little how-to on this subject matter. I've been following this thread and wanting to try it myself. But not exactly confident to try it out yet. Thanks in advance for anyone who wants to share some knowlege.

fpp 2006-07-19 13:38

What is the part or notion you're not comfortable with exactly ?

NokNok770 2006-07-19 14:45

Well, I don't want to install samba and samba client...it's way huge. I want to go the route of fanoush. I'm reading ITom's post #14, it has all that modprobe, debmode, insmod commands in there that I'm not too familiar with. I guess if he re-post again how he got it to work, I would try it. I'v already download the cif.ko. I was hoping for an easy route...but I guess I can go read about all those commands and what it does. I haven't added any modules to the kernel before.

fpp 2006-07-19 16:03

I am preparing a (very) beginner-oriented tutorial for this, covering both the Windows and the Nokia basics. If your only problem is the command line stuff in the shell, in the meantime you can try (as root) :

mkdir /netshare
insmod /full/path/to/cifs.ko
mount -t cifs //your.pcs.ip.address/yourshare /netshare -o domain:yourworkgroupname,user:yourusername,passwor d:yourpwd

then look into the /netshare directory...

(all the your-something stuff is from the Windows side)

ITom 2006-07-19 16:11

NokNok770

1. (Starting CIFS module)

Code:

sudo gainroot
cd /lib
mkdir modules
cp /media/mmc1/cifs.ko /lib/modules # cifs.ko extracted on desktop and copied to root of mmc card
insmod /lib/modules/cifs.ko

2. (attacing Windows Shared Folder to root-FS of Nokia)

Code:

cd /media/mmc1/
mkdir MyNetFolder
mount -t cifs //000.000.000.000/shared-folder-name /media/mmc1/MyNetFolder/ -o codepage=cp1251,iocharset=utf8,username=administrator,password=adminpassword

where 000.000.000.000 - IP address of Windows-PC
administrator - username in Windows
adminpassword - password of username
codepage - your Windows default codepage (Russian in my example)

ITom 2006-07-19 16:13

1 Attachment(s)
P.S. NO SPASE IN STRING after ' -o ' (i don't now why it added in post)
All command should be done in rootmode.

NokNok770 2006-07-19 19:21

Thanks a lot...I'm going to try it when I get home :)

fpp 2006-07-19 20:15

Okay, I have published my (maybe overly) detailed Howto on the Maemo Wiki :

http://maemo.org/maemowiki/HowToAccessWindowsCIFS

TIA to those interested for reviewing it and amending it where necessary...

NokNok770 2006-07-20 00:09

Woohoo....got it working

Thanks fpp,itom,fanoush. There was a couple of errors here and there in the instruction, but I figured it out. I am able to open pictures, mp3, and even videos on my PC with no problem. There is a question I have though, does this thing works one way only PC>N770. Because I am unable to copy a video file onto my shared folder on the PC. It says updating but nothing shows up. Of course I checked the box saying the user can modify the folder when sharing the folder.

ITom 2006-07-20 04:10

NOkNok770
Quote:

I am unable to copy a video file onto my shared folder on the PC. It says updating but nothing shows up. Of course I checked the box saying the user can modify the folder when sharing the folder.
Did you made mount to shared with Administrator? If not may be you have no permission fow writing from PC side. Check your shared folder on PC, don't forget that real connection speed can be not fast (in my case 4 mbps)
Post your 'mount' string here. Also more easy do mounting (till we have no script) using ssh ;)

fanoush 2006-07-20 07:48

Quote:

Originally Posted by NokNok770
I am unable to copy a video file onto my shared folder on the PC.

It may be also permissions on N770 side. If you mount as root all inside share belongs to root and default permissions allow only root to write. Add uid=29999,gid=29999 to -o options. With this all belongs to normal N770 user named 'user' with id 29999.

2fpp: the howto is great and thanks for the mirroring :) problem with webpark.cz is that it allows only links to binaries with same http referrer. Solution is to create html on webpark that links to the binary and this works. I was just lazy to do it and this forum cannot accept .tgz binaries as attachement. Copying link to adress bar causes no http referrer (in most browsers, opera in n770 may be an exception) and this is allowed.

fanoush 2006-07-20 08:12

here is my mount script, it is probably too complex for this simple task :) first part is generic way of executing itself as root via sudo gainroot so you don't need to do it before executing it. In second part I tried to prompt for password without showing it on display but it doesn't work, it is shown, read command is too limited, there is no -s (silent) option in n770 version. But at least it is not remembered in shell history. Too bad it is still in /proc/mounts and /etc/mtab when share is mounted. Removing it would require mount.cifs helper executable which takes special care of the password.
Code:

#!/bin/sh
# use gainroot to become root and relaunch itself and remember original tty device
if [ `id -u` != 0 ] ; then
TTY=`tty`
#if not already root, call itself as root
sudo gainroot <<EOF
export TTY=$TTY
$0 $*
EOF
exit
fi
TTY=${TTY:-`tty`} #set also if called directly as root
# real script follows

grep -q cifs /proc/modules || insmod /root/cifs.ko
echo -n >$TTY "Password:"
read <$TTY >/dev/null 2>&1 pass
mount -t cifs //192.168.2.1/win_c$ /home/user/MyDocs/network/franta_c -o domain=FRANTA,user=Administrator,password=$pass,uid=29999,gid=29999

More details about cifs module is here http://linux-cifs.samba.org/

Hedgecore 2006-07-20 13:42

Excellent, thank you guys so much for all the help and knowledge. I'd originally gotten 'unknown device' when attempting to mount a share last night but this was because I didn't realize I had to reintegrate the cifs module each time. I mounted a share no problem. On my main PC I'm getting 'permission denied' errors but that can be solved easily when I have some time...

Now, that load/run applet... does it let you store commands? It'd be cool to incorporate mount/unmount scripts.

fpp 2006-07-20 22:24

fanoush: great script, thanks ! (nice sudo trick :-)

acdczip 2006-07-22 07:36

help! trying to mount share folder but got this message on the N770 "can't find /media/mmc1/nfs in the /etc/fstab". insmod /lib/modules/cifs.ko without any problem. I am doing all this with root access. I even rmmod and insmod again to make sure.

ITom 2006-07-22 08:01

fanoush
Thank you, Great!!! I deleted from your script all strings about password, add run-path to load-applet-run. Working excellent.

BanditRider 2006-07-22 11:56

Anyone else having problems playing mp3s from a cifs mounted directory?
I'm getting little pauses every 4 or 5 seconds as the audio player fetches another piece of the file across the network. It seems like the audio player isn't handling it's buffer very well.

ITom 2006-07-22 12:43

BanditRider
Same situation for me with pauses and same thinking about buffer in audio player only because no pauses during video playing.


| 1   2   | Next
All times are GMT. The time now is 06:50.

vBulletin® Version 3.8.8