LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to mount a windows share as guest? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-mount-a-windows-share-as-guest-4175508973/)

Red Squirrel 06-24-2014 01:00 AM

How to mount a windows share as guest?
 
I am trying to map a share that is hosted by an Asus router which has an external drive connected. The share is setup as guest and works fine if accessed within the GUI (Kubuntu) but I want to mount it as a real mount point so that I can just open files directly instead of having to first download them.

When I try to mount by command line it prompts for a password. This is the command I am trying:

Code:

mount.cifs //192.168.1.1/drive /mnt/drive -o=guest
I also tried various combinations like -o guest or just guest or leaving that out etc... no go. It always prompts for a password.

How is this done?

jefro 06-24-2014 05:22 PM

I think this is what you are asking.
https://wiki.ubuntu.com/MountWindowsSharesPermanently

dolphin_oracle 06-24-2014 09:15 PM

this should work
Code:

mount -t cifs //192.168.1.1/drive /mnt/drive
you may need to be root or use sudo to issue the command.

Red Squirrel 06-25-2014 06:13 PM

Tried that already, it just prompts for a password.

I don't want to actually use fstab, as this is not really a permanent mount, ex: it may possibly be unavailable, and I don't want my system to lockup because it's trying to access it.

michaelk 06-25-2014 06:29 PM

What happens when just press the enter key at the password prompt?
With Ubuntu you need to use sudo since root is disabled by default.

The syntax is:

sudo mount -t cifs //192.168.1.1/drive /mnt/drive -o username=guest,password=""

The password is actually your Kubuntu users password to allow sudo. You can add a line to your /etc/fstab to mount the drive at boot up if desired.

You should be able to open the files in the file browser without downloading...

Red Squirrel 06-27-2014 04:23 AM

Nope no go. I just keep getting access denied whether I use root or sudo.

It does work through GUI, but I'm hoping to have a real mount point. There is also an issue using the GUI where I can't delete anything, can only add.

If it helps this is what I get in dmesg:
Code:

[122842.174965] CIFS VFS: Send error in SessSetup = -13
[122842.175113] CIFS VFS: cifs_mount failed w/return code = -13
[122857.077737] CIFS VFS: Send error in SessSetup = -13
[122857.077869] CIFS VFS: cifs_mount failed w/return code = -13
[122873.298618] CIFS VFS: Send error in SessSetup = -13
[122873.298762] CIFS VFS: cifs_mount failed w/return code = -13
[122907.833431] CIFS VFS: Send error in SessSetup = -13
[122907.833588] CIFS VFS: cifs_mount failed w/return code = -13

Actually, I think I'm not even using the right command. I should be using smbmount right? How do I get that command? It's not valid on my system. I'm running Kubuntu.

michaelk 06-27-2014 07:01 AM

You can use either smbmount or mount commands. In reality they call mount.cifs. Is samba installed? The file browser has a built in samba client which is why it works through the desktop.

Are you using the correct drive share name? Does the /mnt/drive directory exist?

You can see the share name via the smbclient command (May have to install samba first)
smbclient -L 192.168.1.1

Red Squirrel 06-27-2014 03:51 PM

Yeah don't have smbclient or any of the smb commands. I tried to guess what to type in apt-get but no luck finding what package gives those commands. Tried smb-client, samba, samba-common, samba-client etc...

That may be part of my issue, probably need those programs installed. Just not sure what they call it in my distro.

michaelk 06-27-2014 04:13 PM

In a nutshell Kubuntu is a derivative of Ubuntu that uses KDE for the desktop environment. What version are you running?

Have you verified you are specifying the correct share name?

Red Squirrel 06-29-2014 06:35 PM

This the version:

Code:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
NAME="Ubuntu"
VERSION="13.10, Saucy Salamander"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.10"
VERSION_ID="13.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"



All times are GMT -5. The time now is 05:41 AM.