开发者

Mouting with cifs

开发者 https://www.devze.com 2023-01-25 06:50 出处:网络
Im writing a script to create mounts. The system command I use is: sudo /bin/mount -soft -t smbfs -o username=\'{username}\',password=\'{password}\' {server_path} {local_path}

Im writing a script to create mounts. The system command I use is:

sudo /bin/mount -soft -t smbfs -o username='{username}',password='{password}' {server_path} {local_path}

It works a treat, but here's the problem....

If an username/password is not valid. I can tidyup using unmount command. However, it corrupts开发者_开发技巧 the other mounts to the same {server_path} on the box.

Any ideas how I can stop this from happening?

Thanks

Jen


In general, the smbfs module in the Linux kernel is deprecated in favor of the cifs module. So the first thing I'd try would be to switch to that one, and see if that fixes your issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号