maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   SMB/CIFS share support (https://talk.maemo.org/showthread.php?t=11836)

Moonshine 2007-11-16 17:18

SMB/CIFS share support
 
I have to say, this was a feature I was really looking forward to in OS2008. Here was a chance to finally get rid of my cifs.ka/SMBbrowser/File Manager setup and have something native in File Manager itself. However, without simple username/password support for shares it all but worthless for me. :(

Maybe (hopefully) this is still a work in progress, but I'm still a little amazed that the feature would be added without any authentication support. Does everyone really keep their shares wide open? :eek:

technut 2007-11-16 18:39

Re: SMB/CIFS share support
 
Linux noob here, sorry. But now that the SMB capability is included, can you at least mount them from the Terminal (with authentication), without having to load more software?

File Manager connections aren't 100% solid yet anyway. My shares are open but I'm finding the connection to them is sporadic. Last night I could connect to 3 out of 4 shares, but this morning only 1 of them is connecting, even after a reboot of OS2008. The others show in File Manager but report "(no files/folders)".

jhoff80 2007-11-16 18:56

Re: SMB/CIFS share support
 
I'm pretty sure its not Samba support but its uPnP support, so you can only access media sharing.

Moonshine 2007-11-16 19:01

Re: SMB/CIFS share support
 
Well I gave that a try with the normal "mount -t cifs //server/share mountpoint -o domain=mydomain,user=myuser,password=mypass" and it didn't work. It doesn't look like they are using a cifs kernel module. I'm still digging around to see if there are any SMB/CIFS tools installed with OS2008.

Moonshine 2007-11-16 19:07

Re: SMB/CIFS share support
 
Quote:

Originally Posted by jhoff80 (Post 95934)
I'm pretty sure its not Samba support but its uPnP support, so you can only access media sharing.

Filemanager actually supports both, but just won't do any authentication for SMB/CIFS/Samba shares. The "help" in OS2008 states:

Quote:

Shared Folders

File manager also displays the shared content of available folders that have Server Message Block (SMB) support. They are located in the file tree under shared folders. This root folder is visible when there is a network connection and there are shared directories on the network. You cannot delete, move, copy or rename the shared folders root folder or copy files or folders directly under it. You cannot access password protected shared folders.
It's the last sentence that kills me.. :confused:

Moonshine 2007-11-17 00:31

Re: SMB/CIFS share support
 
FWIW, the CIFS kernel modules for OS2007 don't load under OS2008. Looks like they will need to be re-compiled before there is any SMB/CIFS support with authentication.

gemniii42 2007-11-25 16:17

Re: SMB/CIFS share support
 
Quote:

Originally Posted by Moonshine (Post 95939)
Filemanager actually supports both, but just won't do any authentication for SMB/CIFS/Samba shares. The "help" in OS2008 states:



It's the last sentence that kills me.. :confused:

Yesterday, while I was responding to another post I looked on my 810 file manager and the "shared folder" showed up. I was able to browse Samba shares on my Linux machine and read .txt files with "note", but could only see shared folders on my Windows machines. Shared media was also there.
I powered down th 810 and powered up,now I can only see Shared media, not Shared folders.
Any idea what happened?

technut 2007-11-25 19:39

Re: SMB/CIFS share support
 
Quote:

Originally Posted by technut (Post 95923)
File Manager connections aren't 100% solid yet anyway. My shares are open but I'm finding the connection to them is sporadic. Last night I could connect to 3 out of 4 shares, but this morning only 1 of them is connecting, even after a reboot of OS2008. The others show in File Manager but report "(no files/folders)".

Quoting myself... I had the same kind of experience. It seems pretty flakey.

RipTorn 2007-11-29 16:15

Re: SMB/CIFS share support
 
This was a feature I was looking foward to the most in OS2008, I have a heap of movies I share around the house with Samba for me and my 6 year old and was hoping to be able to sit anywhere in the house with all my music/movies/generic media with the samba share.

Hopefully this gets fixed, I was able to view a non-password samba for about 5 min, but couldn't copy any files and the default media player has crap .avi support, soon as I tried again later the 'shared' folder vanished and I haven't seen it since...

Plus the 'busybox' mount program sh*ts me to tears sometimes with its useless error messages... 'faied to mount'

thats my vent for the night! :)


-Rip

fanoush 2007-11-29 16:29

Re: SMB/CIFS share support
 
Quote:

Originally Posted by Moonshine (Post 96088)
FWIW, the CIFS kernel modules for OS2007 don't load under OS2008. Looks like they will need to be re-compiled before there is any SMB/CIFS support with authentication.

You can find fs/cifs/cifs.ko inside http://fanoush.wz.cz/maemo/modules-r....6.21.0.tar.gz

RipTorn 2007-11-29 17:13

Re: SMB/CIFS share support
 
cheers! thanks works great, I can mount my samba share via command line now, but for the life of me I can't work out how to allow 'user' access the mounted filesystem... is there a command line command to allow regular users read the filesystem ?

qole 2007-12-21 06:24

Re: SMB/CIFS share support
 
I had cifs working under OS2007, and I swear I had it working under OS2008 yesterday, but now it doesn't work. Filemanager's implementation of CIFS is, as stated above, useless for passworded shares. So I grabbed fanoush's cifs.ko and did insmod with it, but no luck.

my mounting syntax:

mount -t cifs //192.168.0.9/myshare /home/user/MyDocs/lan/myshare -o user=SERVERNAME\\User,password=password1

I just get a cryptic "mounting //192.168.0.9/myshare on /home/user/MyDocs/lan/myshare failed."

What's going on? The share and the mountpoint both exist (file manager can even see the share). Like I said, it worked before... Did I break something? Could it have something to do with using USB in host mode? Argh!

lorelei 2007-12-21 09:30

Re: SMB/CIFS share support
 
Quote:

Originally Posted by RipTorn (Post 102040)
cheers! thanks works great, I can mount my samba share via command line now, but for the life of me I can't work out how to allow 'user' access the mounted filesystem... is there a command line command to allow regular users read the filesystem ?

I don't have the possibility to check, but I think that you can add the following option to make it readable by the user "user":

-ouid=user

Anyways...I agree that it is rather limiting not being able to put username/password in the filemamanger to access SMB shares...it makes it kinda useless :(

krbvroc1 2007-12-21 17:47

Re: SMB/CIFS share support
 
I just solved my own issue with cifs causing a
mount failed. Maybe it will help others. My server share does NOT have a password.

Rather than my old method of passing user=pcguest to the mount command, I passed the option guest instead which worked!

Quote:

This failed:
mount -t cifs //192.168.2.100/podcast /media/mmc2/mnt -o noperm,sec=none,uid=user,user=guest
Quote:

This worked:
mount -t cifs //192.168.2.100/podcast /media/mmc2/mnt -o noperm,sec=none,uid=user,guest

Stevie P 2007-12-30 14:38

Re: SMB/CIFS share support
 
Quote:

Originally Posted by RipTorn (Post 101999)

Plus the 'busybox' mount program sh*ts me to tears sometimes with its useless error messages... 'faied to mount'

-Rip

Note that although mount doesn't print anything useful to the terminal, it does log a bit more useful diagnostic information that can be retrieved with dmesg. Not particularly friendly, but better than nothing.

qole 2008-01-06 22:25

Re: SMB/CIFS share support
 
Quote:

Originally Posted by Stevie P (Post 117780)
Note that although mount doesn't print anything useful to the terminal, it does log a bit more useful diagnostic information that can be retrieved with dmesg. Not particularly friendly, but better than nothing.

I checked dmesg after trying to mount a known-working share and having it fail with the mysterious "mount: mounting ... on ... failed" error. There was nothing at all. No new messages. Argh... :mad:

qole 2008-01-06 23:51

Re: SMB/CIFS share support
 
OK. I'm down on my knees. Begging.

Please, someone compile/package smbfs (and/or smbclient and/or samba) for OS2008! I want some more useful samba tools. I found "mount.cifs" to be extremely helpful in tracking down problems, because I could set a verbosity level that would control the error messages. The samba tools that come included in OS2008 are worse than useless. They're very nearly useless but they're useful enough for many people so they stop progress of really useful tools.

qole 2008-01-09 23:52

Re: SMB/CIFS share support
 
I notice that the source for the entire samba package for maemo 4.0 is in the source repository. Can anyone compile it for me (us) and put it in a repository? Please?

I especially want tools like mount.cifs, smbfs and/or smbclient to help me debug my problems mounting samba shares.

didjit86 2008-01-11 01:04

Re: SMB/CIFS share support
 
smbclient/smbmnt and smbfs are here. http://www.gronmayer.com/it/index.ph...ow_pck=121#121

But I installed and still cannot mount my linux shares. I can see them, with smbtree. Let me know if you have better luck then I.

Didjnit

qole 2008-01-12 06:05

Re: SMB/CIFS share support
 
Didjnit:

Don't play such cruel tricks on a fella! You got my hopes up, only to have them dashed by the sharp stones of reality.

The repo that contains the samba packages is the Maemo Hackers repo for the "mistral" OS, which really shouldn't be listed as an OS2008 repo, but there are a few command-line programs that still work in OS2008 so someone stuck it in. When I try to apt-get install smbfs, I get:

Quote:

The following packages have unmet dependencies:
smbfs: Depends: samba-common (= 3.0.22-3) but 3.0.23c-1osso6 is to be installed

Moonshine 2008-01-12 06:44

Re: SMB/CIFS share support
 
Penguinbait's KDE package has fully functional SMB support included. If you're desperate you could look at extracting it from the tarball.

qole 2008-01-13 23:05

Re: SMB/CIFS share support
 
Good news, everyone.

I managed to get my passworded CIFS shares to mount under OS2008! They are visible in File Manager and other apps, too!

The solution is pretty straightforward. I needed to get two files.

The first one is the cifs.ko from fanoush's module archive, getting it out of the archive and onto your tablet requires some know-how (ie ask someone else ;) ) I recommend making the proper module directory and putting the cifs.ko into that dir. The correct module dir name for OS2008 is:

/lib/modules/2.6.21-omap1/


The second one is mount.cifs from the Debian Sid armel smbfs package. Download it into a directory on your tablet, then, as root, use
Quote:

dpkg-deb -x smbfs_3.2.4-1_armel.deb smbfs
to extract the contents to a folder, then do:
Quote:

cp smbfs/sbin/mount.cifs /sbin/mount.cifs
chmod a+x mount.cifs
So, to get my share to mount, I did the following as root (this can be put in a script):
Quote:

insmod /lib/modules/2.6.21-omap1/cifs.ko
(Note that this may fail with a "file exists" error, that's OK, it means your system already has it loaded)
Quote:

mount.cifs //SERVER/share /home/user/MyDocs/lan/share -o user=SERVER\\myname,pass=passwd1
...replacing the proper things in the proper places, of course...

It just works. To see if I was doing this for nothing, I unmounted the share and tried
Quote:

mount -t cifs //SERVER/share /home/user/MyDocs/lan/share -o user=SERVER\\myname,pass=passwd1
only to get the familiar "Mount: .... failed" error.

Hopefully that helps someone else who is having the same problems.

PS: I first tried to install the whole Samba package from the Debian Sid armel repository. It depended on all sorts of stuff, and by the time I was done, I had replaced libc6 and other core system libraries. That totally toasted my system, and I had to reflash. Thankfully, I backed up before I began that adventure, so I was back up and ready to try again the next day.

turan 2008-01-15 10:09

Re: SMB/CIFS share support
 
Quote:

Originally Posted by qole (Post 127004)
Good news, everyone.
I managed to get my passworded CIFS shares to mount under OS2008! They are visible in File Manager and other apps, too!

Thanks for the instructions! I got this working, but after I was done I noticed my File manager doesn't find the shared folder anymore. Did I screw up something? Any idea why this could be?

BTW I myself am new with Linux, but luckily my friend helped me to get the files needed for this. There's probably more people like me so here's the files I used if someone needs them:

http://www.tehas.org/n800/cifs.ko
http://www.tehas.org/n800/mount.cifs
http://www.tehas.org/n800/umount.cifs

qole 2008-01-15 18:04

Re: SMB/CIFS share support
 
If you want File Manager to show your mounted directory, you have to mount it to a folder under /home/user/MyDocs/ (or mount it as a dir on one of the SD cards), so for me, I have a folder called /home/user/MyDocs/lan that has a subfolder for each of my SMB mounts.

If you could get to the shared folder via the file manager before, you probably don't need my instructions. They are only for people who couldn't access the share before due to a password or other problems.

I also found that the standard umount works fine, I didn't need umount.cifs.

FGol 2008-01-15 21:28

Re: SMB/CIFS share support
 
I like using EmelFM2 as a file manager. It or maybe GPE Filemanager ought to be able to see anything outside of /home/user.
Frank

turan 2008-01-15 21:47

Re: SMB/CIFS share support
 
Quote:

Originally Posted by qole (Post 128189)
If you could get to the shared folder via the file manager before, you probably don't need my instructions. They are only for people who couldn't access the share before due to a password or other problems.

Yes I could get to the shared folders via File manager, but I couldn't get to them from xmms file manager so that I could've added music to the playlist. Maybe there would have been an easier way to achieve this?

Now everything works as intended! Today the File manager can also access the shared folders even though I did nothing about it.

qole 2008-01-15 23:49

Re: SMB/CIFS share support
 
Quote:

Originally Posted by turan (Post 128352)
Now everything works as intended! Today the File manager can also access the shared folders even though I did nothing about it.

Did you reboot in the meantime? Sometimes a reboot fixes things ;)

turan 2008-01-16 09:34

Re: SMB/CIFS share support
 
Quote:

Originally Posted by qole (Post 128412)
Did you reboot in the meantime? Sometimes a reboot fixes things ;)

Sure I tried that a number of times. :)

frasej 2008-01-17 15:45

Re: SMB/CIFS share support
 
Thanks all. I haven't tried it yet, but that should work for my original question.

shenson 2008-01-23 17:34

Re: SMB/CIFS share support
 
I got this working by just insmodding cifs.ko and using the standard mount command. The -o option should come first before the "device" and mount point for example:

Quote:

mount -t cifs -o user=SERVER\\myname,pass=passwd1 //SERVER/share /home/user/MyDocs/lan/share

youbecha 2008-01-25 04:30

Re: SMB/CIFS share support
 
I am assuming this isn't an auto-mount like I have gotten used to in Ubuntu?

Will this mod change how File-manager sees the non-password protected shares?

sashabe 2008-03-04 21:57

Re: SMB/CIFS share support
 
Is there a way to symlink Windows-shared network folders on tablet? I tried these variants:
ln -s \\Wl500g.premium\part0\folder\
or
ln -s smb://guest@192.168.0.1/
...but they don't work.

sckmcck 2008-03-04 21:57

Re: SMB/CIFS share support
 
I think you have to mount it to a fold, then you can symlink the folder.

qole 2008-03-04 22:56

Re: SMB/CIFS share support
 
Quote:

Originally Posted by youbecha (Post 133421)
I am assuming this isn't an auto-mount like I have gotten used to in Ubuntu?

That's right. The N8x0 doesn't connect to the network upon boot like most Linux distributions, so you can't mount network shares on boot. Theoretically, you should be able to put your mount statements into /etc/fstab as "no auto" and then mount them once you connect to the network, but I can't test that since "regular" mount doesn't work for me.

Quote:

Originally Posted by youbecha (Post 133421)
Will this mod change how File-manager sees the non-password protected shares?

No, the File Manager does its own thing. The mounted shares, if placed in folders that the File Manager can see, will show as regular folders in the File Manager, but everything else should function as before.

Quote:

Originally Posted by sashabe (Post 150917)
Is there a way to symlink Windows-shared network folders on tablet? I tried these variants:
ln -s \\Wl500g.premium\part0\folder\
or
ln -s smb://guest@192.168.0.1/
...but they don't work.

Mounting a network share to a folder is already kind of like a symlink, in that it is a remote share appearing as a local folder. In your examples, it looks like you are trying to use "ln -s" as a kind of mount command.

arunchowdhary 2008-03-05 18:40

Re: SMB/CIFS share support
 
I have recently got my N800 and I have installed OS2008 on it. Its working fine. I was trying to access my Laptop (windows XP Media center edition) shared files from N800, to do so I have opened File manager and found few other network machines/folder but not mine laptop. I have turned off my Norton Internet Security Firewall (windows firewall is already tured off by default, since its using Norton firewall), then tried it again but could not see my sahred files/folder from laptop. However I can see the same shared folders from other Laptop/Machine (windows XP) and even from my Archos 604wifi.

My laptop is listed in "workgroup" (not in domain), I have full privilges on my user ID on laptop.

Could somebody help me to get the network shared files from my laptop on N800. I don't know why its not listing my sahred folders in "file manager".

I also wanted to reverse, I mean if I could access my N800 from my Laptop, is it possible? I appreciate your help.

Thanks.
Arun.

qole 2008-03-07 08:17

Re: SMB/CIFS share support
 
I would recommend installing ssh on your tablet and WinSCP on your laptop, if you want access to the tablet's files on your laptop. If your laptop has bluetooth, you can use that, too.

Unless your laptop's shared folders have no passwords on them (anyone can get full access), you're going to have to mount them using the command line methods discussed in this thread.

JELaVallee 2008-03-18 23:32

Re: SMB/CIFS share support
 
Quote:

Originally Posted by qole (Post 150952)
... Theoretically, you should be able to put your mount statements into /etc/fstab as "no auto" and then mount them once you connect to the network, but I can't test that since "regular" mount doesn't work for me.
...

You may want to try this:
  1. Create a bash script with the mount commands for your various smb shares that you want to mount.
  2. Copy the script to /etc/network/if-up.d/

In theory (and all appropriate disclaimers to such), this should attempt to establish your mounts every time your network successfully connects. I'm still working out how you could make this sensitive to executing only for particular connections (e.g. only mount home computer shares when your connection SSID is your home wireless router, etc.)

I'll play with it tonight and let you know the results.

Qole: Have you tried using vanilla mount with the object credentials PRE-ceding the mount point details in your command line argument list? I think I saw that as a possible solution either in this thread or elsewhere in the forums.

Cheers,
Etienne

qole 2008-03-19 16:43

Re: SMB/CIFS share support
 
Quote:

Originally Posted by JELaVallee (Post 157092)
In theory (and all appropriate disclaimers to such), this should attempt to establish your mounts every time your network successfully connects. I'm still working out how you could make this sensitive to executing only for particular connections (e.g. only mount home computer shares when your connection SSID is your home wireless router, etc.)

At the moment, I have a couple of scripts, one for when I'm at home, and one for when I'm on the road. When I'm on the road, I use ukki's sshfs to mount my drives over an encrypted tunnel.

I've discovered that mounting network shares can be a bad thing; the media file crawler thingy (metalayer-crawler) can wander off onto your network folders and really bog your system down.

Quote:

Originally Posted by JELaVallee (Post 157092)
Qole: Have you tried using vanilla mount with the object credentials PRE-ceding the mount point details in your command line argument list? I think I saw that as a possible solution either in this thread or elsewhere in the forums.

Yeah. I tried everything. But mount.cifs does the job, so I'm OK.

sunmercury 2008-11-20 07:49

Re: SMB/CIFS share support
 
Does anyone know if Qole's instruction here works for Diablo ? If not, is there another way to access CIFS shares in Diablo ? I tried Wizard Mounter but it does not work in Diablo.

qole 2008-11-21 03:07

Re: SMB/CIFS share support
 
Do your shares show up in file manager under "Shared Folders"? Most Windows shares will just automatically show up there. If they are passworded or otherwise secured, you'll probably still have to get the cifs stuff from fanoush and Debian as per my previous instructions (or use Easy Debian ;) )

EDIT: See my next post for updated Diablo stuff.


All times are GMT. The time now is 08:08.

vBulletin® Version 3.8.8