View Full Version : Samba?
Ceklund
07-15-2006, 06:40 PM
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:
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
07-15-2006, 07:07 PM
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
07-15-2006, 08:09 PM
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
07-16-2006, 10:07 AM
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
07-16-2006, 11:04 AM
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
07-16-2006, 12:26 PM
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
07-16-2006, 01:14 PM
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
07-16-2006, 01:32 PM
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
07-16-2006, 01:58 PM
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
07-16-2006, 02:42 PM
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
07-16-2006, 10:36 PM
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
07-17-2006, 04:41 AM
... 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
07-17-2006, 05:04 AM
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
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
07-17-2006, 06:50 AM
Use insmod with full module path, not modprobe.
Hedgecore
07-17-2006, 07:03 PM
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
07-18-2006, 11:14 AM
Sorry to be ignorant but how do you use samba once its installed. i have samba and samba client installed. Thanks in advance.
Hedgecore
07-18-2006, 11:40 AM
- - 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?
Hedgecore
*** 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
07-18-2006, 03:09 PM
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.
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
07-19-2006, 09:35 AM
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.
What is the part or notion you're not comfortable with exactly ?
NokNok770
07-19-2006, 10:45 AM
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.
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)
NokNok770
1. (Starting CIFS module)
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)
cd /media/mmc1/
mkdir MyNetFolder
mount -t cifs //000.000.000.000/shared-folder-name /media/mmc1/MyNetFolder/ -o codepage=cp1251,iocharset=utf8,username=administra tor,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)
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
07-19-2006, 03:21 PM
Thanks a lot...I'm going to try it when I get home :)
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
07-19-2006, 08:09 PM
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.
NOkNok770
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
07-20-2006, 03:48 AM
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
07-20-2006, 04:12 AM
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.
#!/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,ui d=29999,gid=29999
More details about cifs module is here http://linux-cifs.samba.org/
Hedgecore
07-20-2006, 09:42 AM
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.
fanoush: great script, thanks ! (nice sudo trick :-)
acdczip
07-22-2006, 03:36 AM
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.
fanoush
Thank you, Great!!! I deleted from your script all strings about password, add run-path to load-applet-run. Working excellent.
BanditRider
07-22-2006, 07:56 AM
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.
BanditRider
Same situation for me with pauses and same thinking about buffer in audio player only because no pauses during video playing.
wiredless
07-22-2006, 11:56 AM
mount -t cifs at my address keeps returning (cant find in fstab) error. Any idea why?
Hedgecore
07-22-2006, 09:28 PM
I had the same problem (read back in the thread... you must have root enabled in the same shell you ran the other steps in)
BanditRider
07-24-2006, 11:36 AM
Here is my setup:
I have a Linksys WRTSL54GS wireless router which has a USB port to which I've connected a 120GB drive in an external enclosure. The router firmware allows me to create a "windows share" which I've named NAS and has read/write access for user "joe" with password "passw0rd". This is the same thing, really, as having a shared folder on a Windows machine.
I created a directory called NAS in /media to be the mount point. You could create it in /media/mmc1 to make it easier to browse to. This was just my choice.
I don't mind having the cifs kernel module loaded all the time so I've added a line near the top of /etc/init.d/minircS to load the module at boottime.
Here's an excerpt of my minircS file:
#!/bin/sh
umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin
insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko
insmod /lib/modules/cifs.ko
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t usbfs usbfs /proc/bus/usb
...
I cut out alot of stuff here...
then at the bottom of the file
...
#osso hotfix #24145
chmod a+w /sys/devices/platform/audio-i2c/mic_enable
swapon -a
mount /media/mmc2
exit 0
You'll notice I also load the ext2 kernel module and mount my ext2 partition on my mmc card here. I also activate my swap partition here.
This is my /etc/fstab file:
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p1 /media/mmc1 vfat rw,noauto,nodev,noexec,nosuid,utf8,uid=29999 0 0
/dev/mmcblk0p2 /media/mmc2 ext2 rw,noauto 0 0
/dev/mmcblk0p3 swap swap defaults 0 0
//192.168.1.1/NAS /media/NAS cifs rw,user=joe,password=passw0rd 0 0
Now I can mount the share with the command
mount /media/NAS
But since you need to be root to mount a filesystem, I modified fanouch's slick gainroot script and called it mountNAS and umountNAS as follows:
mountNAS
#!/bin/sh
# mount cifs shared folder from the router
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
sudo gainroot <<EOF
$0 $*
EOF
exit
fi
mount /media/NAS
and umountNAS
#!/bin/sh
# un-mount cifs shared folder from the router
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
sudo gainroot <<EOF
$0 $*
EOF
exit
fi
umount /media/NAS
I made them executable with chmod +x mountNAS umountNAS
Then I coppied them to /usr/bin (which is in both user's and root's PATH)
I can now mount the share by ebtering the command mountNAS
and unmount it with umountNAS
I've added them to gnuite's cpu/load w/ run applet and it works great.
BruceL
10-26-2006, 10:46 PM
In the first post it was asked if Samba would allow printing from the 770. Abiword has a menu item for printing. Other programs don't have a print menu item, but since Abiword does, could it print to a shared printer through Samba?
Bruce
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.