我目前正在使用cifs在/ etc / fstab中安装一些网络共享(需要身份验证).它运行良好,但我想在fstab之外移动身份验证详细信息(用户名/密码)并能够chmod它600(因为如果我要更改其权限,fstab会有问题).我想知道是否可以这样做(多用户系统,不希望所有用户都能看到这些权限).
从:
//server/foo/bar /mnt/bar cifs username=user,password=pass,r 0 0
至:
//server/foo/bar /mnt/bar cifs <link to permissions>,r 0 0
(或类似的东西).谢谢.
解决方法
从mount.cifs联机帮助页:
credentials=filename specifies a file that contains a username and/or password. The format of the file is: username=value password=value This is preferred over having passwords in plaintext in a shared file,such as /etc/fstab. Be sure to protect any credentials file properly.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。