ubuntu等linux系统给windows共享文件
生活随笔
收集整理的這篇文章主要介紹了
ubuntu等linux系统给windows共享文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝
sudo apt-get install samba?
修改配置添加共享目錄 /home/whq
sudo gedit /etc/samba/smb.conf &添加
[ShareFiles]comment = Shared Folder require passwordpath = /home/whq/valid users = whqavailable = yesread only = nobrowsable = yespublic = yeswritable = yes?
設置用戶和密碼(注意要添加一個已有用戶)
sudo smbpasswd -a whqNew SMB password:
Retype new SMB password:
Added user whq.
?
如果正式環境,最好創建一個不可以登錄的專用用戶操作。
創建專用用戶
groupadd test -g 6000useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/null?
?
這時就可以用smbpasswd -a test增加test這個samba賬號了!為了增加系統的安全性,所以加的系統賬號不要給shell它,也不給它指定目錄,到時在/home目錄給test賬號建個文件夾,該文件夾只有test有讀寫權限即可!
如:
mkdir /home/testchown -R test:test /home/test?
總結
以上是生活随笔為你收集整理的ubuntu等linux系统给windows共享文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Vue.js + Nuxt.js 项目中
- 下一篇: spring整合mybatis接口无法注