我正在尝试设置自动安装网络驱动器。网络驱动器需要用户/密码。在“mount.cifs”的手册页中,有两种提供用户/密码的方法。
1-[not recommended] put the user/pass in /etc/fstab
2-create a separate credentials file and put the user/pass in the credentials file
Run Code Online (Sandbox Code Playgroud)
cat /etc/fstab //192.168.1.17/imp/sql /imp/sql cifs 凭证=/root/credentials
文件凭据包含用户名和密码(root 用户可以读取此文件)。并且密码以纯文本形式存储。
我的问题是如何在 CIFS/SAMBA 中使用密码加密?