K
K
Kerm2018-08-08 12:22:28
linux
Kerm, 2018-08-08 12:22:28

Linux mount remote shares on server startup?

It was necessary to connect the ball on the server to another computer in the local network, if you connect like this: mount -t cifs -o username=,password=,domain= //10.10.5.186/images /var/www/user/data/www/site .ru/img/ then everything connects normally, only after restarting the server everything flies.

I want to make it automatically mounted at startup, for this I did:

In the file /etc/auto.master added:
/var/www/user/data/www/site.ru/img /etc/auto.images

In the file /etc/ auto.images added:
images -fstype=cifs,rw,noperm,username=,password=,domain=://10.10.5.186/images

Then restarted the service:
/sbin/service autofs restart

As a result, the folder is empty and when you enter it errors in /var/log/message:
Aug 8 12:06:41 chopt automount[7972]: key ".ftpaccess" not found in map source(s).
Aug 8 12:12:12 chopt automount[8056]: key "socks_new" not found in map source(s).

Can't figure out what I did wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Sechin, 2018-08-08
@Kerm

Add to fstab

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question