Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
06-27-2013, 01:50 PM
|
#1
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Rep:
|
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
|
|
|
06-27-2013, 02:41 PM
|
#2
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,181
|
I expect you would need to post the entry before anyone could give you any realistic advice.
|
|
|
06-27-2013, 09:55 PM
|
#3
|
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
|
|
|
|
06-28-2013, 03:38 PM
|
#4
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
Here is the exact line as requested.
Code:
//192.168.0.2/shares /media/samba cifs guest,iocharset=utf8,auto 0 0
|
|
|
06-28-2013, 06:50 PM
|
#5
|
Member
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 754
Rep:
|
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
|
|
|
06-29-2013, 12:52 AM
|
#6
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
Everything works fine with . I'll try add that command to the startup list of programs later.
|
|
|
06-29-2013, 01:04 AM
|
#7
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Rep:
|
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
|
|
|
07-03-2013, 04:27 PM
|
#8
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
Quote:
Originally Posted by Z038
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
|
|
|
07-03-2013, 05:23 PM
|
#9
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Rep:
|
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.
|
|
|
07-05-2013, 02:42 PM
|
#10
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
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
|
|
|
07-05-2013, 06:52 PM
|
#12
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
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.
|
|
|
07-09-2013, 05:07 AM
|
#13
|
Member
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349
Original Poster
Rep:
|
Solved this thanks to this page.
I created the file and made it executable (chmod +x) : /etc/network/if-up.d/fstabmount
Which contained: 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.
|
|
|
All times are GMT -5. The time now is 05:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|