Ubuntu 掛載samba報錯“mount: //x.x.x.x/nfsbackup is write-protected, mounting read-only”解決方案

Ubuntu掛載samba命令、報錯信息

mount -t cifs -o dir_mode=0755,file_mode=0755,username=bak,password='backup',uid=111,gid=118 //nas/nfsbackup /backup

查看cifs軟件包

dpkg --get-selections | grep cifs-utils

dpkg-query -l cifs-utils

安裝cifs-utils包

apt-get install cifs-utils

掛載samba

 mount -t cifs -o dir_mode=0777,file_mode=0777,username=bak,password='backup',uid=111,gid=118,rw //10.9.13.33/nfsbackup /backup

拋出錯誤:

root@ubuntu:~# mount -t cifs -o dir_mode=0777,file_mode=0777,username=bak,password='backup',uid=111,gid=118,rw //10.9.13.33/nfsbackup /backup
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

配置安全認證參數“sec”,參數說明

sec=
           Security mode. Allowed values are:

           路   none - attempt to connection as a null user (no name)

           路   krb5 - Use Kerberos version 5 authentication

           路   krb5i - Use Kerberos authentication and forcibly enable packet signing

           路   ntlm - Use NTLM password hashing

           路   ntlmi - Use NTLM password hashing and force packet signing

           路   ntlmv2 - Use NTLMv2 password hashing

           路   ntlmv2i - Use NTLMv2 password hashing and force packet signing

           路   ntlmssp - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message

           路   ntlmsspi - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message, and force packet signing

           The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the default was changed to sec=ntlmssp.

           If the server requires signing during protocol negotiation, then it may be enabled automatically. Packet signing may also be enabled automatically if it's enabled in
           /proc/fs/cifs/SecurityFlags.

安全認證模式的掛載命令

mount -t cifs -o dir_mode=0777,file_mode=0777,username=bak,password='backup',uid=111,gid=118,rw,sec=ntlm //10.9.13.33/nfsbackup /backup

掛載完成 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章