I decided to set up a remote log backup location using CIFS. I've set up a regular user account on my machine (with password), created a shared folder, gave the newly created user full access to the folder. Went to CIFS page in Tomato, checked "Enable" checkbox, entered share name (\\192.168.1.2\Router_logs, also tried \\Computer_name\Router_logs), user name and password and clicked save. Tomato tried to mount the share for some time but eventually failed. Logs show that cifs_mount continuously fails with error -22. Searched Google, found no description of the error code. Knowing from past experience that you can't do anything right from GUI in *nix environment SSHed into the router and executed the following: mount -t cifs user=user_name //192.168.1.2/Router_logs /cifs1 Got the following error: mount: Cannot read /etc/fstab: No such file or directory I'm about to go searching for mount source code to see what causes the error now really. Any help on troubleshooting the problem would be greatly appreciated. EDIT: Now, after trying and trying again to mount the share from GUI I've got a new error. Dec 8 15:34:53 user.err kernel: CIFS VFS: No response buffer Dec 8 15:34:53 user.err kernel: CIFS VFS: cifs_mount failed w/return code = -147 EDIT: I have manually created /etc/fstab and written down the info to mount the share. The info is as follows: //192.168.1.2/Router_logs /cifs1 cifs username=user_name,password=pass 0 0 When trying to mount I am getting invalid argument error. And I really can't figure out which of the arguments is incorrect... EDIT: And forgot to say that I am running Tomato 1.13 and WinXP.
You might have to specify more parameters, such the domain, etc. - see http://threebit.net/mail-archive/centos/msg00017.html Also try mounting that share from another Win box, and see if that works. The cifs mount in Tomato uses the form so make sure you use the unc=BACKslashes... your would thus probably not work.
BACKslashes cannot be used because then \ is completely ignored by mount. That is if I try \\192.168.1.2\Router_logs mount will say that there's no such folder as \\192.168.1.2Router_logs Now that you mention it I see there's a bit of a problem with it. From the WinXP box (the one with the share) I can see my own machine and 1 Vista wireless machine. From Vista wireless I can see the router and itself. NAT loopback is enabled. No other firewalls are running. All machines are in the same domain apart from router of course (which is shown in Vista as Tomato BTW) because there's no place to specify the domain name for it as far as I can see. EDIT: AP isolation is, of course, also disabled.
Try quotes, like mount -t cifs unc="\\ip\share",username=... , or maybe double backslashes, or something, and remember the "unc=" part. Here is my mount output in Tomato of a mount spec'd as UNC: \\10.1.2.1\MetroWeb Username: guest Password: pw Domain: (the share is on a Linux box though). Forgot to mention: The mount -t cifs uses different syntax to mount -t smbfs (the old smb mount), so google for man mount.cifs perhaps.
I think the problem lies in the network misconfiguration because of which my router can't see my WinXP box's share. At least "No such device" error seems to point to something like this. I also tried setting up a share on Linux with no avail so I guess it is the network after all. Any idea what else should be configured to allow Tomato to finally see my machine's share ? EDIT: About mount -t cifs and mount.cifs. Man page for mount.cifs says the following "Mounting using the CIFS URL specification is currently not supported." which I assume to be the lack of UNC support. Also none of the supported params have unc. Plus Tomato has mount-cifs, not mount.cifs and that has an ex termly helpful and complete usage: Usage: mount-cifs -m|-u
Is it windows if yes check the windows firewall and if turned on set it up to allow the connection not sure but probably something to do with ports 137/8/9 which seem to be "windows" ports but google would probably be your friend here. Re the share I have it working on windows but found that I needed to set the share manually and not use the wizard method I presume that this is some sort of MS undocumented feature. Anyways go the folder right click, select "sharing" click the "you understand the risks of sharing" blurb and click allow sharing, enter a share name and click allow network users to change files. Go to router (CIFS set-up page) and enter \\xxx.xxx.xxx.xxx\share name entered above, for the user name and password I used a user with admin rights, as I could not get it working with a "standard" or "guest" user account and it should then work like mine.
I don't even have Windows firewall as part of my WinXP install I think (at least I do remember ripping it out once ). The share was created through Management console. Because mount continuously returns "No device found" error when I seem to enter the valid parameters I still think it is something to go along with network. Now that I mention it I do remember that I probably did something nasty to the sharing on this PC once. Could've been some Service disabled or sharing turned off completely. Any idea what services are needed for sharing ? Another question. Does someone know the exact line Tomato sends to mount when I enable cifs1\2 in GUI ? I was unable to find it anywhere.
I just remembered I figured this out on a dd-wrt router, but this is "the Tomato way" for a command line mount: Code: insmod cifs mount -t cifs SomeName /cifs1 -o unc=\\\\IP.address.of.server\\ShareName,username=guest The "-o" seems to be the crucial part...
# mount -t cifs \\\\192.168.1.2\\Router_logs /cifs1 -o unc=\\\\192.168.1.2\\Router_logs,username=user_name,password=pass_word mount: Mounting \\192.168.1.2\Router_logs on /cifs1 failed: Invalid argument
should be mount -t cifs ROUTERLOGS \\\\192.168.1.2\\Router_logs /cifs1 -o unc=\\\\192.168.1.2\\Router_logs,username=user_name,password=pass_word,domain=domain_name You omitted the "handle", the ROUTERLOGS above, and possibly the domain. Also, make sure you insmod cifs as the "invalid argument" may be because mount don't know about cifs.
# insmod cifs # mount -t cifs ROUTERLOGS \\\\192.168.1.2\\Router_logs /cifs1 -o unc=\\\\192.168.1.2\\Router_logs,username=abc123,password=abc123,domain=MSHOME mount: Cannot read /etc/fstab: No such file or directory And I also did run insmod cifs in the previous example. Because the arguments are wrong it tries to look into fstab for the volume to mount now. And mount usage says nothing about any labels or somesuch. BusyBox v1.2.2 (2007.12.05-10:35+0000) multi-call binary Usage: mount [flags] DEVICE NODE [-o options,more-options] Mount a filesystem. Filesystem autodetection requires /proc be mounted. Flags: -a: Mount all filesystems in fstab -o option: One of many filesystem options, listed below -r: Mount the filesystem read-only -t fs-type: Specify the filesystem type -w: Mount for reading and writing (default) Options for use with the "-o" flag: async/sync: Writes are asynchronous / synchronous atime/noatime: Enable / disable updates to inode access times dev/nodev: Allow use of special device files / disallow them exec/noexec: Allow use of executable files / disallow them suid/nosuid: Allow set-user-id-root programs / disallow them remount: Re-mount a mounted filesystem, changing its flags ro/rw: Mount for read-only / read-write bind: Bind a directory to an additional location move: Relocate an existing mount point. There are EVEN MORE flags that are specific to each filesystem You'll have to see the written documentation for those filesystems Seems like it's helpless. There's obviously something wrong with network config (that is Tomato) which does not allow SMB.
OK. I admit, I am a complete and utter moron. I had "Printer and file sharing" unchecked in connection preferences. *goes away to mourn over his idiocy*