January 10

Linux: Automatically mount cifs from linux to windows with different smb versioning

To automount cifs from linux to windows 2016 you can do the following

//remoteserver/sharename /localserver/foldername cifs credentials=/yourcredfilelocation,iocharset=utf8,sec=ntlmv2,vers=3.0     0    0

Put the following in your credential file.

username=user@domain
password=password

Then you can type the following command:
mount -a

If you receive an code = -22 error there is probably something wrong in the options you picked.

By: Timothy Jay Conrad


Copyright 2021. All rights reserved.

Posted January 10, 2018 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B