Unable to mount windows server 2012 r2 to linux centos 7.6.1810

joanazpeitia

New Member
Joined
Jan 25, 2019
Hi,

I'm trying to mount a Windows Server 2012 R2 on my Linux CentOs 7.6.1810.
I'm doing it on Linux through the fstab file (etc/ftsab) on the following way;
//winServerIP/winServerFolder /home/desiredExistingFolder cifs vers=3.02,user,username=xxx,password=xxx,sec=ntlm,auto,r,uid=500,suid 0 0
I'm getting the following error,
mount error(22): Invalid argument
I went to the man page but could not find a solution.
This method on fstab is working to mount other servers running on Linux (using vers=2.0 instead) but can't find the way to make it work for Windows Server 2012 R2.
Any advice will be really appreciated.
Many thanks,

Joan
 
Hi livix07

Thanks for helping :).
I have SAMBA installed but with the default set up.
Regarding to what I read, I might be wrong correct me please if so, I would need to edit smb.conf (SAMBA) if I would like to use my linux machine as a server. To be able to mount a server running windows server 2012 r2 on to my linux machine I would have to edit my fstab and add a line similar to the one I posted above. What process would you suggest I should follow to achieve that; from a Linux machine using CentOs 7.6.1810 map a server running on Windows Server 2012 R2.
Thanks again.

Joan
 
Hi livix07

Thanks for helping :).
I have SAMBA installed but with the default set up.
Regarding to what I read, I might be wrong correct me please if so, I would need to edit smb.conf (SAMBA) if I would like to use my linux machine as a server. To be able to mount a server running windows server 2012 r2 on to my linux machine I would have to edit my fstab and add a line similar to the one I posted above. What process would you suggest I should follow to achieve that; from a Linux machine using CentOs 7.6.1810 map a server running on Windows Server 2012 R2.
Thanks again.

Joan

Let's say you want to share the folder /home/SHARED with anyone. In this case your smb.conf file should contain this:

Code:
[SHARED]
path = /home/SHARED
available = yes
writeable = yes (if you just want to allow reading but not writing than use "read only = yes")
guest ok = yes

You can find all available parameters for the smb.conf file here.

Can Windows Server see the Linux shared folder?
If NO, then make sure port 445 is open on the Linux computer.
 
Back
Top Bottom