安装配置samba服务器和客户端
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装配置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:
[email protected]:/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:
[[email protected] ~]$ 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
本文出自 “用C++写诗” 博客,谢绝转载!
以上是关于安装配置samba服务器和客户端的主要内容,如果未能解决你的问题,请参考以下文章