LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 01:50 PM   #1
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Rep: Reputation: 13
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, 02:41 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,181

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
I expect you would need to post the entry before anyone could give you any realistic advice.
 
Old 06-27-2013, 09:55 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,737
Blog Entries: 28

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

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

Original Poster
Rep: Reputation: 13
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, 06:50 PM   #5
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 754

Rep: Reputation: 156Reputation: 156
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-29-2013, 12:52 AM   #6
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
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, 01:04 AM   #7
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
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, 04:27 PM   #8
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
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, 05:23 PM   #9
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
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 05:39 PM.
 
Old 07-05-2013, 02:42 PM   #10
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
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, 06:44 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,181

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
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, 06:52 PM   #12
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
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, 05:07 AM   #13
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
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 07:01 AM
No /ect/fstab -how do I have a partition mounted? tnrooster Fedora 4 06-13-2007 01:17 AM
Can't write to mounted HD, set permissions in fstab, need help LoneCanisLupus Linux - Hardware 12 02-23-2007 03:49 AM
Network fstab entries not being mounted at boot tisource Linux - Networking 4 12-26-2005 11:47 AM
Mounted Samba via fstab, need help "tweaking" it mickboda Linux - Networking 5 09-07-2002 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:29 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