linux系列服务总结之四:SAMBA共享设置完整介绍
生活随笔
收集整理的這篇文章主要介紹了
linux系列服务总结之四:SAMBA共享设置完整介绍
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 查看及安裝軟件包
[root@rhel4-1 ~]# rpm -qa |grep samba
samba-client-3.0.10-1.4E.9
samba-3.0.10-1.4E.9
system-config-samba-1.2.21-1
samba-common-3.0.10-1.4E.9
2 查看默認配置文件
[global]
? ?workgroup =?jxwpx server string = Samba Server
? ?log file = /var/log/samba/%m.log
? ?max log size = 50
? ?security = user
[homes]
? ?comment = Home Directories
? ?browseable = no
? ?writable = yes
[printers]
? ?comment = All Printers
? ?path = /var/spool/samba
? ?browseable = no
? ?guest ok = no
? ?writable = no
? ?printable = yes
[public]
? ?path = /home/public
? ?public = yes
? ?only guest = yes
? ?writable = yes
? ?printable = no
3 建立samba用戶
# adduser c1
# smbpasswd -a c1
4 測試配置文件
# testparm
5 啟動samba服務器
# service smb start 1 列出samba服務器的共享目錄
# sambaclient -L 192.168.1.1 -U admin
2 連接遠程共享
# smbclinet //192.168.1.1/share -U admin
3 掛載遠程目錄
# sambamount //192.168.1.1/public /mnt
# mount -t smbfs -o username=admin //192.168.1.1/public /mnt
或
smbmount??//192.168.1.1/public /mnt -o username=admin
然后,進入/mnt目錄查看windows共享中的資源。
[root@rhel4-1 ~]# rpm -qa |grep samba
samba-client-3.0.10-1.4E.9
samba-3.0.10-1.4E.9
system-config-samba-1.2.21-1
samba-common-3.0.10-1.4E.9
2 查看默認配置文件
[global]
? ?workgroup =?jxwpx server string = Samba Server
? ?log file = /var/log/samba/%m.log
? ?max log size = 50
? ?security = user
[homes]
? ?comment = Home Directories
? ?browseable = no
? ?writable = yes
[printers]
? ?comment = All Printers
? ?path = /var/spool/samba
? ?browseable = no
? ?guest ok = no
? ?writable = no
? ?printable = yes
[public]
? ?path = /home/public
? ?public = yes
? ?only guest = yes
? ?writable = yes
? ?printable = no
3 建立samba用戶
# adduser c1
# smbpasswd -a c1
4 測試配置文件
# testparm
5 啟動samba服務器
# service smb start 1 列出samba服務器的共享目錄
# sambaclient -L 192.168.1.1 -U admin
2 連接遠程共享
# smbclinet //192.168.1.1/share -U admin
3 掛載遠程目錄
# sambamount //192.168.1.1/public /mnt
# mount -t smbfs -o username=admin //192.168.1.1/public /mnt
或
smbmount??//192.168.1.1/public /mnt -o username=admin
然后,進入/mnt目錄查看windows共享中的資源。
轉載于:https://blog.51cto.com/jxwpx/197274
總結
以上是生活随笔為你收集整理的linux系列服务总结之四:SAMBA共享设置完整介绍的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: react如何阻止冒泡失败
- 下一篇: Linux学习笔记之一