Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dear Linux Users,
I would like to mount a SAMBA share on my computer, where I'm running Debian 8 (Jessie). The SMB share is located at the server of my institute and works as a domain controller (it's a SAMBA 4). All machines are located inside the private network of the institute.
I can see and mount the shares from a OSX 10.9.5 with:
From my computer, I can access the share via nautilus (GNOME nautilus 3.14.1), through the "Connect to Server" option at the sidebar, with:
- smb://<server_domain_name>/share as Server Address
- <user_name>@<domain> as the username
- <domain>.es as the domain
However, it gives me the following error when using the command-line:
Code:
sudo mount.cifs //<server_domain_name>/share ~/my_share -o user=<user_name>@<domain>,workgroup=<domain>.es
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I have tried removing the @<domain> part from the user, adding a $ at the end of the server address (//<server_domain_name>/share$), but everything has been unsuccesful.
When I try to connect to the server with smbclient, it gives me another error:
It seems to be a Linux-related issue, since it works for OSX but not for Debian (I also tried up in Ubuntu and it did not work). Have I overlooked anything? I am unable to find a solution to this issue and I have been struggling with this more than two weeks...
I would appreciate some hints/comments about this, since I am aware I am not the only one person experiencing this, and after trying multiple apparent solutions from many forums, I still haven't found the right one.
Thanks in advance
Last edited by Peter Pfand; 01-03-2017 at 05:06 AM.
If it works using nautilus then it should work on the command line... However, you are using the wrong syntax for user. It is either
user=username or user=workgroup/username
Try using:
Code:
sudo mount -t cifs //server_name/share ~/my_share -o user=username,domain=<domain>.es
See man pages for mount.cifs for more information.
I get the same error in that case. According to the man pages, it seems to be a permission-related issue. However, if I can access, as you say, via nautilus, I should have access through smbclient or mount.
I am a bit surprised by your error. I use workgroup= in the options instead of domain=, and it works.
Note that the command first asks for the sudo password, then for the share password.
sudo mount -t cifs //server_name/share ~/my_share -o user=username,workgroup=<domain>
You might want to do a sudo ls before issuing the command, enter sudo password, the you can be sure the password is for the user as specified in the command.
I am a bit surprised by your error. I use workgroup= in the options instead of domain=, and it works.
Note that the command first asks for the sudo password, then for the share password.
sudo mount -t cifs //server_name/share ~/my_share -o user=username,workgroup=<domain>
You might want to do a sudo ls before issuing the command, enter sudo password, the you can be sure the password is for the user as specified in the command.
I get the same error again.
Quote:
Originally Posted by c0wb0y
Post the output of:
Code:
grep '^\s*hosts' /etc/samba/smb.conf
Put both the loopback IP and the LAN IP into that 'hosts' line. Then restart samba.
Also, check your samba log file. If still does not work, check your firewall rules.
That's weird, I get no output with that grep, but the /etc/samba/smb.conf file exists.
Have you checked if ntlmv2 options help? (In my /etc/fstab it is sec=ntlmv2.)
At work, I do a login based on a file in /root. That file has to have the right permissions, though, and there was a change in that before I could use something like
Code:
user=<domain>\<user>
password=<password>
(There's a backslash in between, just as on Windows. Might try that instead of a (forward)slash in some of your commands, too.)
and now I have to use something like
Code:
user=<user>
domain=<domain>
password=<password>
Also, there can not be any excess spaces in that file.
This tread really helped me! Thanks for posting guys.
Quote:
Originally Posted by Ratamahatta
Have you checked if ntlmv2 options help? (In my /etc/fstab it is sec=ntlmv2.)
At work, I do a login based on a file in /root. That file has to have the right permissions, though, and there was a change in that before I could use something like
Code:
user=<domain>\<user>
password=<password>
(There's a backslash in between, just as on Windows. Might try that instead of a (forward)slash in some of your commands, too.)
and now I have to use something like
Code:
user=<user>
domain=<domain>
password=<password>
Also, there can not be any excess spaces in that file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.