ubuntu等linux系统给windows共享文件
生活随笔
收集整理的這篇文章主要介紹了
ubuntu等linux系统给windows共享文件
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
安裝
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?
設(shè)置用戶和密碼(注意要添加一個(gè)已有用戶)
sudo smbpasswd -a whqNew SMB password:
Retype new SMB password:
Added user whq.
?
如果正式環(huán)境,最好創(chuàng)建一個(gè)不可以登錄的專用用戶操作。
創(chuàng)建專用用戶
groupadd test -g 6000useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/null?
?
這時(shí)就可以用smbpasswd -a test增加test這個(gè)samba賬號了!為了增加系統(tǒng)的安全性,所以加的系統(tǒng)賬號不要給shell它,也不給它指定目錄,到時(shí)在/home目錄給test賬號建個(gè)文件夾,該文件夾只有test有讀寫權(quán)限即可!
如:
mkdir /home/testchown -R test:test /home/test?
總結(jié)
以上是生活随笔為你收集整理的ubuntu等linux系统给windows共享文件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Vue.js + Nuxt.js 项目中
- 下一篇: pd怎么卸载linux系统,parall