linux – fstab和cifs挂载,可以在fstab之外存储身份验证信息吗?

linux – fstab和cifs挂载,可以在fstab之外存储身份验证信息吗?,第1张

概述我目前正在使用cifs在/ etc / fstab中安装一些网络共享(需要身份验证).它运行良好,但我想在fstab之外移动身份验证详细信息(用户名/密码)并能够chmod它600(因为如果我要更改其权限,fstab会有问题).我想知道是否可以这样做(多用户系统,不希望所有用户都能看到这些权限). 从: //server/foo/bar /mnt/bar cifs username=user,pa 我目前正在使用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.
总结

以上是内存溢出为你收集整理的linux – fstab和cifs挂载,可以在fstab之外存储身份验证信息吗?全部内容,希望文章能够帮你解决linux – fstab和cifs挂载,可以在fstab之外存储身份验证信息吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/1041326.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-24
下一篇2022-05-24

发表评论

登录后才能评论

评论列表(0条)

    保存