LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-27-2013, 12:50 PM   #1
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Rep: Reputation: 7
Samba not mounted in fstab?


I have a samba mount line within my /etc/fstab but it doesn't mount it at startup for some reason. If I perform sudo mount -a it works fine with no errors.

What's the likely problem for this, or more importantly how do I resolve it?

Thanks
 
Old 06-27-2013, 01:41 PM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,472

Rep: Reputation: 692Reputation: 692Reputation: 692Reputation: 692Reputation: 692Reputation: 692
I expect you would need to post the entry before anyone could give you any realistic advice.
 
Old 06-27-2013, 08:55 PM   #3
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, Mint
Posts: 7,331

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Is mount set to "auto" in fstab?

http://www.tuxfiles.org/linuxhelp/fstab.html
 
Old 06-28-2013, 02:38 PM   #4
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Here is the exact line as requested.

Code:
//192.168.0.2/shares			/media/samba cifs		guest,iocharset=utf8,auto	0	0
 
Old 06-28-2013, 05:50 PM   #5
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 260

Rep: Reputation: 38
The only things I can think of is to have a browse around /var/log/samba on the host computer. There may be a log on there relating to your client ip address. Or check dmesg on both computer and check for error messages. I am afraid you will have to use a bit of intuition as these are suggestions rather than solutions
 
Old 06-28-2013, 11:52 PM   #6
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Everything works fine with
Code:
sudo mount -a
. I'll try add that command to the startup list of programs later.
 
Old 06-29-2013, 12:04 AM   #7
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 786

Rep: Reputation: 157Reputation: 157
Try replacing 'guest,' in the options with 'username=guest,password='

Like so:
Code:
//192.168.0.2/shares   /media/samba   cifs   username=guest,password=,iocharset=utf8,auto  0  0
 
Old 07-03-2013, 03:27 PM   #8
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Z038 View Post
Try replacing 'guest,' in the options with 'username=guest,password='

Like so:
Code:
//192.168.0.2/shares   /media/samba   cifs   username=guest,password=,iocharset=utf8,auto  0  0
I get permission denied.

Code:
sudo mount -a
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
If I add 'sudo mount -a' to the list of startup applications within MATE desktop environment it doesn't work either. Is there a command line list of startup stuff? Maybe I could get it to wait for a minute after boot, then mount -a? Would this be a suitable time to use cron's "@reboot" marker?

Thanks
 
Old 07-03-2013, 04:23 PM   #9
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 786

Rep: Reputation: 157Reputation: 157
Perhaps it's a timing problem of some kind. You could try issuing a mount command in rc.local, assuming you have that in your distro. In Slackware, it is /etc/rc.d/rc.local. That would occur long after the mounts in fstab, basically near the very end of init processing.


Edit: If you search with google for "mount error(13) permission denied" you will find many hits related to Samba cifs mounts, including quite a few threads on LQ. You might peruse some of those to see if any of them shed light on your problem.

Last edited by Z038; 07-03-2013 at 04:39 PM.
 
Old 07-05-2013, 01:42 PM   #10
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Hi,

Thanks, I've looked to see where Debian keeps its rc.local file, and according to this page, it says that there is no rc.local and talks about putting a script in /etc/init.d, but it also talks about run levels. I'm wondering if a two line script it enough to work. This page suggests there's a little more to it.

Could anyone guide me in how to make a script just perform the line: sudo mount -a

I'm trying to search to see if anyone has created a script before, but searching "-a" is taken as "without a"

Thanks
 
Old 07-05-2013, 05:44 PM   #11
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,472

Rep: Reputation: 692Reputation: 692Reputation: 692Reputation: 692Reputation: 692Reputation: 692
Have you read the info at the Mint forums below and tried their suggestions?

http://forums.linuxmint.com/viewtopic.php?f=90&t=131128
 
Old 07-05-2013, 05:52 PM   #12
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Yes, that is where it currently is, but it doesn't seem to work. I think it's because it's expected to run in a command line box.
 
Old 07-09-2013, 04:07 AM   #13
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 290

Original Poster
Rep: Reputation: 7
Solved this thanks to this page.

I created the file and made it executable (chmod +x) : /etc/network/if-up.d/fstabmount
Which contained:
Code:
#!/bin/sh
mount -a
According to that page, after the network is up, it tries to remount everything again, which is apparently why it fails, as fstab is run before the network is up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cant open cd drive(after mounted) after changing fstab Adol Linux - Newbie 2 02-15-2012 06:01 AM
No /ect/fstab -how do I have a partition mounted? tnrooster Fedora 4 06-13-2007 12:17 AM
Can't write to mounted HD, set permissions in fstab, need help LoneCanisLupus Linux - Hardware 12 02-23-2007 02:49 AM
Network fstab entries not being mounted at boot tisource Linux - Networking 4 12-26-2005 10:47 AM
Mounted Samba via fstab, need help "tweaking" it mickboda Linux - Networking 5 09-07-2002 04:40 AM


All times are GMT -5. The time now is 10:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration