安裝配置samba服務器和客戶端

環境: 主機 Ubuntu 16.04.2 LTS X86_64 。安裝一個虛擬機 vmware + CentOS 6.9.

要求:Ubuntu作samba server, CentOS 作samba client。

步驟:

1. Samba has been installed in my Ubuntu system. The service 'smbd' is running:
bn@YL-RD:/data$ sudo /etc/init.d/smbd status
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: active (running) since 五 2017-08-04 19:24:30 CST; 11min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14390 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)
  Process: 14401 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/smbd.service
           ├─14419 /usr/sbin/smbd -D
           ├─14420 /usr/sbin/smbd -D
           └─14429 /usr/sbin/smbd -D

8月 04 19:24:30 YL-RD systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (s.....
8月 04 19:24:30 YL-RD smbd[14401]:  * Starting SMB/CIFS daemon smbd
8月 04 19:24:30 YL-RD smbd[14401]:    ...done.
8月 04 19:24:30 YL-RD systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
8月 04 19:30:01 YL-RD smbd[14443]: pam_unix(samba:session): session closed for...dy
Hint: Some lines were ellipsized, use -l to show in full.

2. I just add a share path by appending the following text to /etc/samba/smb.conf:
[ubshare]
    comment = public directory
    path = /data
    public = yes
    browseable = yes
    writable = yes

3. Install samba and samba client on CentOS 6.9:
sudo yum install samba samba-client samba-swat

4. Log on Ubuntu samba server on Centos samba client:
[test@localhost ~]$ smbclient //172.16.24.228/ubshare
Enter test's password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]
smb: \>


5. Mount server share path to a path in client, such as /mnt/hgfs


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章