LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2014, 05:07 PM   #1
pople
LQ Newbie
 
Registered: Nov 2013
Distribution: Gentoo
Posts: 26

Rep: Reputation: Disabled
Cant mount samba shares


I have been trying to mount a samba share using:

Code:
sudo mount -t cifs -o username=bob //myserver/bob ./net
I can access the server on another windows machine using the same credentials and I can see and access the share using smbclient on my linux machine I just can't mount it. The error I recieve is:

Code:
 
Password for bob@//192.168.1.151/bob: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Anyone have thoughts on this? I am running Gentoo linux, samba 3.6.23 and kernel version 3.12.21-gentoo-r1 with CIFS support enabled.
 
Old 08-28-2014, 08:45 PM   #2
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
Hi,

Error 13 is a pretty generic error for mount to throw back at you. It typically is caused by leaving a required parameter out, in most cases the domain, even if it's only a workgroup'd machine.

Try adding your domain to your command string. Use the machine name if you're not on a domain. Like:
Code:
mount.cifs -o username=bob,domain=<machine or domain> //myserver/bob ./net
If this still fails, there are many threads online describing this exact problem. It's likely you're facing something similar.


-rabbit
 
Old 08-28-2014, 10:41 PM   #3
pople
LQ Newbie
 
Registered: Nov 2013
Distribution: Gentoo
Posts: 26

Original Poster
Rep: Reputation: Disabled
Well I do have a domain name server which I tried and I got the same error.

Code:
$ sudo mount -t cifs -v -o username=richard,domain=overnetwork.local //192.168.1.151/richard ./net
Password for richard@//192.168.1.151/richard: 
mount.cifs kernel mount options: ip=192.168.1.151,unc=\\192.168.1.151\richard,user=richard,,domain=overnetwork.local,pass=***
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Just for kicks I tried running the same thing on my laptop under localhost where the server was running and it worked. I was able to mount my shared folder. Kind of weird. It's is like cifs is having trouble sending the password or credentials

Code:
sudo mount -t cifs //localhost/richard ./net -o username=richard
 
Old 08-29-2014, 06:06 AM   #4
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
Is there anything in the sudo log? Does it work from a root shell instead of sudo? Is there anything in the samba logs in /var/log/samba server-side?
 
Old 08-29-2014, 03:52 PM   #5
pople
LQ Newbie
 
Registered: Nov 2013
Distribution: Gentoo
Posts: 26

Original Poster
Rep: Reputation: Disabled
Well there is a log file however it is empty. On boot my desktop kernel fails to load the cifs.ko module for some reason. Using modprobe to manually load cifs doesn't work either. I see:

Code:
* loading module cifs.ko
* failed to load cifs.ko
You know of any documentation that discuss why kernel modules failed to load? Or a way to tell the kernel to be more verbose?
 
Old 08-29-2014, 09:41 PM   #6
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
dmesg will tell you more verbose information about modules failing to load. Also, when I said domain, I meant like NetBIOS name type domain. Try putting your samba machine's NetBIOS name for the domain parameter instead.


-rabbit
 
Old 08-29-2014, 10:30 PM   #7
pople
LQ Newbie
 
Registered: Nov 2013
Distribution: Gentoo
Posts: 26

Original Poster
Rep: Reputation: Disabled
Ok. I was a little confused at first when you said domain name. I updated my smb.conf file using the "netbois name" variable and tried to mount again. My smb.conf file:

Code:
[global]
interfaces = lo enp0s25 wlp3s0
workgroup = WORKGROUP
socket options = TCP_NODELAY IPTOS_LOWDELAY
security = user
hosts allow = 192.168.1. 127.
log file = /var/log/samba/log.%m
max log size = 100 
netbios name = reolaptop

[homes]
valid users = %S
browseable = yes
writable = yes
read only = no
I still get an error when mounting.

Code:
sudo mount -t cifs //192.168.1.151/richard ./net -o username=richard,domain=reolaptop
Password for richard@//192.168.1.151/richard: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Running dmesg | grep 'cifs' did not return anything and I did not see anything related to it scrolling through (Somethimes I'm blind). I had been reading the readme for CIFS in the kernel source documentation and they have a section Misc /proc/fs/cifs Flags and Debug Info that I'm not quite sure how to implement. As a test tried changing some of the values in cifsFYI and SecurityFlags on my laptop where mount -t cifs worked util I changed them. I rebooted and things started working on my laptop again but desktop mount -t cifs is still broken. Not sure how anything is logged when the values can change on booting. I included the dmesg.log as an attachment if you have the time to look through it. Also, do you know of a way to pass debuging arguments to the cifs module such as modules_cifs_args="debug" in /etc/conf.d/modules?
Attached Files
File Type: log dmesg.log (62.1 KB, 13 views)
 
Old 08-29-2014, 11:30 PM   #8
BowCatShot
LQ Newbie
 
Registered: Aug 2014
Posts: 15

Rep: Reputation: Disabled
Here's what's always worked for me. Username and password redacted but taken from the windows machine where the drive was installed from.

sudo mount -t cifs -o username=********,password=*******,uid=nick,rw,gid=nick //192.168.5.98/"goflex home public"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba shares mount ro only mrknight Linux - Newbie 6 08-23-2006 09:27 AM
can mount samba shares, but not browse them broxtor Linux - Software 0 11-19-2004 12:00 PM
Samba 3.0.6 - How to mount Samba Shares from Windows 2003? kp1 Linux - Software 2 09-10-2004 06:03 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
mount samba shares (?) bkeating Linux - General 7 07-01-2002 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration