windows share on linux configuration

Dear Experts

I am running crm system web-based which is LAMP stack the web root is /var/ww/html/crmapp and the CRM system reads the files from windows share that is from 2 windows server and executes the logic as per the process developed but I am getting following error from /var/log/messages , attached /etc/fstab, df -h and nswitch.conf, can you please help me in first windows share mount to the same path of web root is it recommend and also is the fstab entires are correct please suggest as the system is very slow.

automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:15 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:17 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:19 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:21 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:23 NYSWB automount[2560]: problem reading master map, maximum wait exceeded
Sep 11 20:06:23 NYSWB automount[2560]: automount: warning: could not read at least one map source after waiting, continuing ...
Sep 11 20:06:23 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
fstabanddf.txt
D_wathiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martyn SpencerSoftware Developer / Linux System Administrator / Managing DirectorCommented:
I am looking at the file you linked. Putting the credentials in the fstab file is not as secure as it could be, so ideally you should use a credentials file. Check out https://anothersysadmin.wordpress.com/2007/12/17/howto-mount-samba-shares-in-fstab-using-a-credential-file/ as an example of how to do this. If the credentials in your file are genuine, you may want to re-upload your file with them masked out.

As I see it, the errors you are seeing are more to do with automount or autofs. Do you have any configuration files for those? Again, if they contain credentials, please sanitise the files before uploading them.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
D_wathiAuthor Commented:
thank you very much , noted your point, please find the below

--------------auto.smb.sub---------------
vi auto.smb.sub
* -fstype=cifs,credentials=/root/secret.txt,uid=500,gid=100 ://${host}/&


------------------auto.sm.top------------
* -fstype=autofs,-Dhost=& file:/etc/auto.smb.sub

------------auto.master---------
#
# 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
#
# 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 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
* -fstype=autofs,-Dhost=& file:/etc/auto.smb.sub
Martyn SpencerSoftware Developer / Linux System Administrator / Managing DirectorCommented:
The problem is with the line in auto.master at the end of the file. That line is being reported as an error. I am used to seeing entries like:
/home/userA/Network /home/userA/.autofs/auto.sambashares --timeout=3600 --ghost

Open in new window

Where did that line originate in your file? My example above reads /home/userA/.autofs/auto.sambashares which defines mounts that I want to happen when /home/userA/Network is accessed.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

D_wathiAuthor Commented:
thanks I understand your example where the user home directory is used but in this end of the auto.master line points
 to /etc/auto.smb.sub where it is has following in it  * -fstype=cifs,credentials=/root/secret.txt,uid=500,gid=100 ://${host}/&   shall I comment this.
Martyn SpencerSoftware Developer / Linux System Administrator / Managing DirectorCommented:
You are pretty much at the limit of my comfort recommending a course of action here, since autofs is not something I use regularly. All I can say is that the entry that is giving an error does seem invalid to me. There is no harm commenting it out temporarily but you may notice that some mounts do not happen, though I expect this to be unlikely if the line contains a syntax error. If commenting the line out removes the error in your logs, my suggestion was probably valid.
Rahul ShendeJr. Linux System AdministratorCommented:
comment the fstab entry, and add a script which will mount your drive at system startup. so the process of automount will take place at system boot time.
D_wathiAuthor Commented:
thanks for the inputs, can you please help me understand in what way adding script for mount will have benefits compared to entries in fstab.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.