Bekijk de volledige versie : How to mount a Windows share
bubendorf
17-01-2005, 10:12
Hello,
I've installed Olegs 1.9.2.7 CR3 firmware on my brand new Asus WL500g.
I now want to mount a Windows share.
I tried several commands like
mount -t smbfs -o username=xyz,password=abc //host/share /tmp/mountpoint
But every time I get the error
mount: Mounting //host/share on /tmp/mountpoint failed: No such device
How can I mount the Windows share?
Do I have to use NFS for that?
Markus
I don't have much Linux knowledge, but: Can you mount the share from another Windows machine (perhaps you have a firewall blocking incoming connections...).
bubendorf
17-01-2005, 12:07
I don't have much Linux knowledge, but: Can you mount the share from another Windows machine (perhaps you have a firewall blocking incoming connections...).
There is no firewall between the WL500g and the windows machine. I have no problem connecting another Windows machine.
Antiloop
17-01-2005, 12:25
I think he wants to mount a windows share AT his wl500g
afaik this is not implemented in the WL500g but I could be wrong
I think he wants to mount a windows share AT his wl500g
afaik this is not implemented in the WL500g but I could be wrong
You're absolutely right, this is not implemented.
If you have a usb pendrive or a hard disk, you can uncompress Jocky's custom firmware 1.2.3.0 on it, and use the full smb set, including smbmount.
It is working fully. Please read the full tread for info about how to make it work.
You don't have to flash any new firmware, only get the files on HD
bubendorf
18-01-2005, 17:09
Thanks for the help. I will give it a try!
Markus
bubendorf
18-01-2005, 18:00
It is working fully. Please read the full tread for info about how to make it work.
You don't have to flash any new firmware, only get the files on HD
I was searching for the thread about 'uncompress the firmware' but was not successfull.
Please give me some hints or a link. Thanks
Markus
gzip -d nameoffile.tar.gz then tar xvf nameoffile.tar
bubendorf
18-01-2005, 22:49
Accidently I downloaded WLHDD_1.1.2.8-JockyW-1.0_en.trx and tried to uncompress this. Obviously this cannot work.
Then I downlaoded 1.1.2.8-custom.zip. This archive has several Samba related binaries in it but no smbmount!
Is there something like 1.2.3.0-custom.zip including smbmount somewhere?
The Linux manual page about smbmount says that the kernel must support smbfs. i don't think my Wl500g kernel has that support built in. Is this a problem or does smbmount work anyway?
Markus
Download this one: http://website.wl500g.info/beta/firmware.php?fid=5
It's a zip file, so use winzip.
You will be able to use the smbmount on Oleg firmwarze, I'm doing this everyday. Read last posts in jocky's 1.2.1.8 firmware for a how to.
cd /tmp/harddisk/part1/conf/bin
mount -o bind /tmp/harddisk/part1/conf/etc/ /etc
# start Samba 3.0.9 daemon
killall -9 nmbd
killall -9 smbd
./nmbd -s /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf -D
./smbd -s /tmp/harddisk/part1/conf/usr/local/samba/lib/smb.conf -D
/tmp/harddisk/part1/conf/bin/telnetd -d -l /tmp/harddisk/part1/conf/bin/mysh
bubendorf
19-01-2005, 10:15
This is the file I allready downloaded yesterday. There is no smbmount in it:
/bum/1.1.2.8-custom#cd ../conf
/bum/conf#find . -name '*smb*'
./bin/libsmbclient.a
./bin/smbcacls
./bin/smbclient
./bin/smbcontrol
./bin/smbcquotas
./bin/smbd
./bin/smbpasswd
./bin/smbspool
./bin/smbstatus
./bin/smbtree
./usr/local/samba/lib/smb.conf
./usr/local/samba/lib/smb.conf.3.0.7
./usr/local/samba/var/locks/smbd.pid
./usr/local/samba/var/log.smbd
./usr/local/samba/var/log.smbtree
./usr/local/samba/private/smbpasswd
I went through the posts about the 1.1.2.8 firmware. There are many posts about smbpassword and about using the Access Point as a Samba server. But there was nothing about using the AP as a Samba client.
Are we talking about the same thing?
Can you please E-Mail a copy of your smbmount binary: markus at bubendorf.ch.
Thanks very much
Markus
You are right, I was talking about smbclient, not smbmount.
There is no smbmount binary, you can only get access using smbclient.
tomilius
24-02-2005, 03:45
Well, I fell for it. I glanced through and ended up downloading that 30mb file for no reason. smbmount would be nice to have though. After all, couldn't it serve, possibly, as a flash drive alternative?
bumb :) So there is no chance to mount smbshare at the wl500gx? Would have nice to have against the new wd netcenter; 100mbit sambashare against the pc and a even bigger drive for the wl500gx ftp
salat
Mr.EoniX
28-09-2005, 12:49
Hey - I would just like to follow up on this question.
Is it posible to mount a samba drive hosted on another linux system on the WL500G Deluxe.
The reason for this is that I have bought a MAXTOR SHARED STORAGE NAS.
But this sweet thing do not have a built in FTP server (Before you flame me for not buying a PLEXTER NAS instead you should know i tried that - and was COMPLETLY dissapointed.) The software/Functionality/Usability/Stability/Finish/Language/FTP/USB and Filesystem/ WAS COMPLETLY AND UTTERLY USELESS!!!.
Its the worst NAS device out there - BUT it has ftp.... (which in turn only support ONE user with only ONE set of permissions.... hurraaayy for that...... what a fuckup from Plextor).
Oh well.... my agression put aside. I know that the MAXTOR SHARES STORAGE makes its windows shares with Samba. And i would like to make the FTP server in my WL500G Deluxe host the content of my Maxtor NAS.
So im asking here:
Is it posible to mount a Samba share on the WL500G Deluxe.... or would it do the same thing a windows share.
I hope someone(Oleg) will respond and clear this one out one time for all.
Or perhabs consider making a firmware able to mount windows shares in the future.
Mr. EoniX
Well, aparently there's no smbmount for the device available. Perhaps, because your host is a linux machine, the Asus is able to mount an nfs share?
Mr.EoniX
28-09-2005, 14:55
Could be - how is that done ?
Well, you've to wait for wl700g, it should be based on the same chipset as maxtor. :D Anyway, is it fast?
As for mounting samba share - no, this is not supported at the moment, as the kernel lacks smb support, and smbmount is missing as well. This functionality would be NEVER added to firmware (by me), as I see no reason mounting windows crap and I've no spare space in the flash to add this rarely used feature... If you need this, consider switching to openwrt, as it's modular firmware.
BTW, OpenWRT could be installed to the matrox too. :)
Mr.EoniX
28-09-2005, 22:25
Perhabs im looking at another idea - perhabs i should be able to open up SSH and an ftp server on the maxtor box itself ?
Anyone have any links concerning this on the Maxter NAS.
Any help on this is worth gold to me.
EoniX
Hi everyone,
are there any updates on this?
Is it possible to 'mount a shared folder on a windows pc' onto the asus?
I ask this because I would like to synchronise a folder which is on a windows pc with a folder which is on the asus.
(let's say the lady downloads lots of music on her pc, I want to keep up with her music, but I use the storage on the asus. Right now I end up copying all through my windows pc. Would be nice to have it automatically synchronised with her folder)
Thanks in advance,
there is a tool called smbclient (at least it's a part of ipkg-installed samba2).
It provides you a possibility to connect to an smb share and either use an interactive client with interface similar to ftp or perform some automated operations (e.g. retreive a tar-ed directory).
Another, but more universal option would be to install ssh server in windows.
P.S. samba2 provides also smbmount, however I never tried to use it
P.P.S. with samba2 you may try even to use something like: mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test
mounting from fstab also might be considered
thanks for the info.
I will take a look at that and inform if i succeed.
newbiefan
08-12-2007, 18:44
It is really easy - all you need is a valid samba2 installation.
1.) Store smbfs.o to directory /opt/modules
2.) Store script sambi to /opt/sbin
make script executable with chmode +x /opt/sbin/sambi
adjust (edit) script sambi to your needs (IP-address and directories)
3.) Add to your post-boot after mounting your harddisk partition to /opt:
#include access to any samba share with smbmount
if [ -e /opt/modules/smbfs.o ]
then
insmod /opt/modules/smbfs.o
fi
perform the usual
flashfs save && flashfs commit && flashfs enable && reboot
Done..
I use script sambi, because the script toggles in a simple way my smbshare.
In newer samba versions, smbfs is missing and cifs is used instead, becausesmbfs has a "not maintained status".
Anyhow, I never experienced probs with smbfs and win, except vista.
I use it to backup my network smbshare to my nas.
FOR OLEG VERSIONS =>9 READ http://www.wl500g.info/showpost.php?p=120236&postcount=33
THIS SMBFS IS FOR OLD VERSIONS <9
Have fun....
Newbiefan,
again I must thank you for your input !!
(but not to forget the others :) )
Not exactly the way you described, but I managed to get a windows share mounted on the asus router. (just used the command that was stored in the sambi script, my mounting of the harddisk/partitions connected to the asus is a bit different so that was a problem)
(only thing is, I didn't see the subdirectories in the directories that are in that windows share, but I guess this is a right-problem on my w2k3 r2 server where the share is located.. )
Anyway.. I managed to get this far, so I think I can manage that.
Thanks a lot !
newbiefan
10-12-2007, 22:35
Newbiefan,
again I must thank you for your input !!
(but not to forget the others :) )
Thanks a lot !
raas, all thanks must go to others, like oleg, gurus & members - I've taken all knowledge from this forum, except scripting.
Anyhow, glad to hear your system works.
Edit: BTW, smbmount works with user & password too. Just goggle for syntax.
So if you have a win-network share, you can use it with password if necessary.
Hallo,
I have this problem:
smbmount //192.168.1.200/share /tmp/landisk -o ro,guest
Anonymous login successful
ERROR: smbfs filesystem not supported by the kernel
Please refer to the smbmnt(8) manual page
smbmnt failed: 255
Pleas help me
do a 'lsmod |grep smbfs' and see if smbfs.o module was loaded correctly. Judging by the error it is not loaded correctly.
HTH,
Wiz
newbiefan
22-03-2008, 17:20
Hallo,
I have this problem:
smbmount //192.168.1.200/share /tmp/landisk -o ro,guest
Anonymous login successful
ERROR: smbfs filesystem not supported by the kernel
Please refer to the smbmnt(8) manual page
smbmnt failed: 255
Pleas help me
Read again: http://wl500g.info/showpost.php?p=72300&postcount=24
and do it step by step - if your are not firm to edit your files, ask again.
You have to insmod smbfs in your post-boot.
I bet insmod is missing!
if you have installed according wengis howto, then do a 'lsmod', you must see smbfs.
I'm experiencing segmentation faults with multiple system commands after mounting a share using smbfs.o.
As you can see below df works fine until I smbmount a network share, the mounted share seems to work nevertheless.
[admin@ROUTER root]$ insmod /opt/bin/smbfs.o
[admin@ROUTER root]$ lsmod |grep smbfs
smbfs 46928 0 (unused)
[admin@ROUTER root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part2 988244 198276 739768 21% /tmp/harddisk
/dev/discs/disc0/part3 152349444 10096224 134514308 7% /tmp/harddisk/part1
/dev/discs/disc0/part2 988244 198276 739768 21% /opt
/dev/discs/disc0/part3 152349444 10096224 134514308 7% /mnt
[admin@ROUTER root]$ /opt/bin/smbmount //shift/500Gig /opt/shift/500Gig -o rw,username=backup,password=***
[admin@ROUTER root]$ lsmod |grep smbfs
smbfs 46928 1
[admin@ROUTER root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part2 988244 198276 739768 21% /tmp/harddisk
Segmentation fault
[admin@ROUTER root]$ ls -all /opt/shift/500Gig
drwxr-xr-x 1 admin root 4096 Apr 1 21:58 .
drwxr-xr-x 4 admin root 4096 Apr 1 21:56 ..
drwxr-xr-x 1 admin root 4096 Mar 30 22:02 Test
The mount seems to break other commands as well.
Tune2fs for instance fails to do a simple -l /dev/discs/disc/part2, immediately exiting with a segmentation fault.
Does anyone have an idea what I'm doing wrong?
Here is the relevant exception as found in the systemlog...
Reserved instruction in kernel code in traps.c::do_ri, line 642:
$0 : 00000000 10009c00 c0171fc8 c01724d0 81ba7f60 8107f520 00000000 00000086
$8 : 00000077 00000002 00000001 66696873 80793ba4 10010f12 80793ba0 0000000a
$16: 00000003 801ef8d0 8187c000 81ba7f60 8107f520 8187cfee 00000000 8150e200
$24: 00000000 2ac111e0 81dbe000 81dbfe78 81ba7f78 80052474
Hi : 00000000
Lo : 000009c0
epc : c0171fc8 Not tainted
Status: 10009c03
Cause : 00000028
Process df (pid: 222, stackpage=81dbe000)
Stack: 00000000 81914820 8107e200 00000000 8187c000 00001000 81ba7f60
00000000 8107f520 00000060 000000ee 10010f12 00000012 800541f4 2ac61f10
0050d0d2 00000015 00000000 00000009 00000000 0000000a 00000000 00000100
8150e1e0 ffffffea 10010f00 7fff7e98 10011000 00000015 00000000 10008d48
800369f8 00000000 00000000 000000ff 00000000 2ac61f10 00000001 2ac61f10
2ac5e9f4 ...
Call Trace: [<800541f4>] [<800369f8>] [<800085c4>] [<80008730>]
Code: 695f6574 65646f6e 00000000 <73726576> 006e6f69 396e6977 00000035 61646c6f 00727474
Maarten2008
24-08-2008, 19:46
Same here :mad: : Once the smbmount share has been mounted several segmentation faults occur. The smbmount does work and I'm able to list the files on my NAS. However the router becomes useless since many other commands are corrupted.
Any solution to this problem?
Config: Asus WL500gP, Oleg firmware 1.9.2.7-10, Samba2, smbfs.o (insmodded)
The same problem: "Segmentation Fault".
I want to access and modify files on my IOmega Network Hard Drive trough script commands, and the only option I see is to mount NAS resource locally.
I try to find ftpfs.o or cifs.o but nothing... :(
Config: Asus WL500gP v1, Oleg firmware 1.9.2.7-9, Samba2, smbfs.o
newbiefan
17-11-2008, 21:49
Well, it has taken a while - but now a new smbfs is available.
please read: http://www.wl500g.info/showpost.php?p=72300&postcount=24
but use this smbfs.o for oelgs FW => 9
http://www.wl500g.info/attachment.php?attachmentid=3820&d=1226234435
and maybe the file nas1 is better as the old sambi-script
have fun
FOR ILY'S FIRMWARE PLEASE USE SMBFS.O FROM HERE:
http://wl500g.googlecode.com/files/modules-1.9.2.7-d-r740.tgz
dreamer69
25-05-2010, 00:47
smbmount //192.168.18.1/Torrents /tmp/local/torrent
s -o rw,guest
235: session request to 192.168.18.1 failed (Called name not present)
235: session request to 192 failed (Called name not present)
235: session request to *SMBSERVER failed (Called name not present)
SMB connection failed
I don't know where I'm doing wrong PLEASE HELP!!!