1.以新北市自由軟體作業系統esteaU為測試機
2.安裝必要軟體
sudo apt-get install samba
3.使用檔案總管建立分享資料夾share和homework
mkdir /home/teacher/share
mkdir /home/teacher/homework
chmod -R 777 /home/teacher/share
chmod -R 777 /home/teacher/homework
4.編輯設定檔
編輯前先備份原來設定檔
mv /etc/samba/smb.conf /etc/samba/smb.conf-bak
sudo nano /etc/samba/smb.conf
貼入下列內容(這個範例檔是share資料夾教師可以寫入,而homework這個資料夾老師學生都可以寫入)
[global]
workgroup = ntpccomputer
netbios name = computerroom
server string = This is ntpc computer room samba server
unix charset = utf8
display charset = utf8
dos charset = cp950
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
printcap name = cups
printing = cups
[share]
comment=教師分享資料夾
path=/home/teacher/share
write list = teacher
browseable = yes
read only = no
writable = yes
guest ok = yes
create mask = 0755
directory mask = 0755
[homework]
comment=學生交作業區
path=/home/teacher/homework
write list = teacher,student
browseable = yes
read only = no
writable = yes
guest ok = no
create mask = 0755
directory mask = 0755
存檔好
5.設定登入者密碼(打密碼時是盲打):
sudo smbpasswd -a student
sudo smbpasswd -a teacher
6.重新啟動samba伺服器
sudo /etc/init.d/smbd restart
7.學生機登入指令 (不可以用最高權限執行)
nautilus smb://帳號@教師主機IP
8.如果要用圖形界面設定,請用教師身份登入,執行[系統工具中/網路芳鄰_samba] ,選擇連線方式和輸入主機位置,做好設定。
而學生則可以在[網際網路/網路硬碟],直接輸入帳號:student,密碼:(是你 執行sudo smbpasswd -a student指令時輸入的密碼)
沒有留言:
張貼留言