問題:
普通用戶創建共享,會提示錯誤:
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares.
Error Permission denied You do not have permission to create a usershare.
Ask your administrator to grant you permissions to create a share.
解決方法:
以下內容是從從http://zhidao.baidu.com/question/189257268.html文章中的思路實現的。
[1]安裝samba
sudo apt-get install samba smbfs
[2]設置samba密碼
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a yourname #yourname 表示你的用戶名
然后按照提示設置密碼
普通用戶登陸后,此時創建共享,會提示錯誤:
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares.
Error Permission denied You do not have permission to create a usershare.
Ask your administrator to grant you permissions to create a share.
只需要將該用戶加入sambashare用戶組
[3]sudo adduser yourname sambashare
[4]logout后重新登陸你就可以設置共享文件夾了。
不過此時你還不能應用你的共享,你需要先設置你的samba密碼。
[5]sudo smbpasswd –a yourname
然后按照提示設置你的samba密碼。
|----------------------------------------------------------------------------------------|
版權聲明 版權所有 @zhyiwww
引用請注明來源 http://www.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2012-02-06 08:59
zhyiwww 閱讀(9885)
評論(0) 編輯 收藏 所屬分類:
linux