mount remote windows share from centos

后端 未结 2 1967
轮回少年
轮回少年 2020-12-24 00:25

I am trying to setup a script that will:

  1. Connect to a windows share
  2. Using LOAD DATA LOCAL INFILE, upload the two files into their appropriate db table
2条回答
  •  心在旅途
    2020-12-24 01:13

    no need to install "samba" and "samba-client", only "cifs-utils" using command

    yum install cifs-utils

    after that in windows share the folder you would like to mount in centos if you didn't do that already ("c:\interpub\wwwroot" in my case).

    make sure you share it with a specific username whom your know the password for ("netops" in my case).

    create a directory in centos in which you would like to mount the windows share in to ("/mnt/cm" in my case).

    after that run that simple command as a root

    mount.cifs //10.16.0.160/wwwroot /mnt/cm/ -o user=netops

    centos will prompt you for the windows username password.

    you are done.

提交回复
热议问题