Ubuntu can't mount windows share

2

I want to access by termin a Windows share so on my Ubuntu 14.04 system I executed the following command:

sudo mount.cifs -o username=dana //192.168.1.4/Users  /mnt/

After entering the sudo password and the windwos user password I got these error

mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Dan

Posted 2014-06-29T13:21:57.963

Reputation: 69

Answers

1

Make sure your account has permissions to mount. Use smbclient to try to access the drive - the smbclient command will give much more meaningful error messages why you cannot mount.

For example:

smbclient \\machinename\foldername -U [username] [password]

If it works, you will get an smb prompt like:

smb>

If not, you will get an error, such as NT_LOGON_FAILUIRE (password wrong) or if the login works but you do not have access on that folder, it will give you that error (which I can't recall off the top of my head)

Check here for info on smbclient and smbclient syntax:
Mounting Windows Shares On Linux Using Samba/CIFS/SMBFS

ben

Posted 2014-06-29T13:21:57.963

Reputation: 166

0

First thing always check if user has access to share and not only permissions to folder also use domain option and use -v to check debug messages.

synchris

Posted 2014-06-29T13:21:57.963

Reputation: 48

0

use this for mounting Windows share to your local Linux machine:

sudo apt-get install cifs-utils
sudo mount -t cifs //hostname.your.windows.machine.hostname/Your_Share /home/user/shares/hostname/ -o vers=3.0,username=user,domain=hostname,uid=1000

Hope it's help.

Vitalii Nesterenko

Posted 2014-06-29T13:21:57.963

Reputation: 1

0

mount(8) - Linux man page

Return Codes
mount has the following return codes (the bits can be ORed):
0: success
1: incorrect invocation or permissions
2: system error (out of memory, cannot fork, no more loop devices)
4: internal mount bug
8: user interrupt
16: problems writing or locking /etc/mtab
32: mount failure
64: some mount succeeded

This suggest that you have generated 3 errors:

  1. user interrupt
  2. internal mount bug
  3. incorrect invocation or permissions

LDC3

Posted 2014-06-29T13:21:57.963

Reputation: 2 062