使用挂载命令之前需要安装cifs-utils

在Centos7下面用这个

yum install cifs-utils

安装完毕后使用挂载命令完成挂载

在挂载之前需要创建被挂载的路径

mkdir -p /mnt/hdf

 

挂载命令格式如下

mount -t cifs \
-o domain="FIRADIO",\
username="用户名"\
,password="密码" \
//10.86.3.54/hdf$/Users/用户名 \
/mnt/hdf

将上面的“用户名”和“密码”进行修改,这里的用户名不需要带上@firadio.net的后缀

你可以将此命令打成一行,然后加入到crontab/etc/rc.local即可每次开启自动挂载

例如要挂载用户名为asheng密码123456的命令是

mount -t cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf

 在crontab里的命令是

* * * * * /sbin/mount.cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf

 

posted on 2018-02-01 19:48  飞儿传媒  阅读(398)  评论(0编辑  收藏  举报
飞儿传媒