我正在维护一个异构的mac和linuxnetworking,所以我决定创build一个perl脚本来统一跨机器的安装策略。
目前在linux中的实现是在/ etc / fstab中正常工作:
//myserverhere.com/cifs_share/mnt/cifs_share cifs user,uid = 65001,rw,workgroup = DEV,credentials = / root / .cifs 0 0
和/root/.cifs包含
username=ouruser password=ourpassword
我试图将其转换为非fstab格式,如下所示:
mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
但似乎没有工作。
有人可以指出我做错了吗?
提前致谢。
伊斯梅尔·卡西姆潘:)
mount.cifs的语法:
mount.cifs {service} {mount-point} [-o options]
您需要在“-o”之后传递选项。 例如,对于您提供的选项,您的命令应该是:
mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share \ -o user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
(我没有testing你给的选项。)