autofs doesnt mount my Windows Share (Ubuntu 16.04 LTS)
UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
autofs doesnt mount my Windows Share (Ubuntu 16.04 LTS)
Hello,
I'm trying to mount a windows share folder from a Win10 PC in my network to a directory in my linux server.
If I do
Code:
mount -t cifs -o username=guest,password=guest,vers=3.0 //192.168.1.107/ulark mnt/ulark
it mounts perfectly, but after the server reboot it doesnt mount because the device first tried to mount, then connects to network.
So i tried autofs
My auto.master:
Code:
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc /etc/auto.misc
/mnt /etc/auto.cifs-shares
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
#/net -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
my auto.cifs-shares that i created for the application:
I'm trying to mount a windows share folder from a Win10 PC in my network to a directory in my linux server.
If I do
Code:
mount -t cifs -o username=guest,password=guest,vers=3.0 //192.168.1.107/ulark mnt/ulark
it mounts perfectly, but after the server reboot it doesnt mount because the device first tried to mount, then connects to network.
This problem should be handled by the _netdev option in /etc/fstab. It seems to exist in Ubuntu. It will defer mounting until networking is up, and is used to mount other network-based filesystems like NFS or filesystems that reside on iSCSI servers.
Regarding your AutoFS problem, I don't have a solution, but if I were you I would be looking for AutoFS log files in Ubuntu. Perhaps in the systemd journal?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.