通过Samba就可以实现window访问Linux的资源,实现两个系统间的数据交互。
安装:apt-get install samba
[wxb@ubuntusamba]$ sudo apt-get install samba
[sudo] password for wxb:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libwbclient0 samba-common smbclient tdb-tools
Suggested packages:
openbsd-inetd inet-superserver smbldap-tools ldb-tools ctdb cifs-utils
The following NEW packages will be installed:
samba tdb-tools
The following packages will be upgraded:
libwbclient0 samba-common smbclient
3 upgraded, 2 newly installed, 0 to remove and 683 not upgraded.
Need to get 23.0 MB of archives.
After this operation, 24.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libwbclient0 amd64 2:3.6.25-0ubuntu0.12.04.10 [29.5 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main smbclient amd64 2:3.6.25-0ubuntu0.12.04.10 [14.4 MB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main smbclient amd64 2:3.6.25-0ubuntu0.12.04.10 [14.4 MB] 8,739 B/s 38min 52s
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main smbclient amd64 2:3.6.25-0ubuntu0.12.04.10 [14.4 MB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main samba-common all 2:3.6.25-0ubuntu0.12.04.10 [338 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main samba amd64 2:3.6.25-0ubuntu0.12.04.10 [8,190 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main samba amd64 2:3.6.25-0ubuntu0.12.04.10 [8,190 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main samba amd64 2:3.6.25-0ubuntu0.12.04.10 [8,190 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ precise/main tdb-tools amd64 1.2.9-4 [23.2 kB]
Fetched 5,040 kB in 49min 42s (1,689 B/s)
Preconfiguring packages ...
(Reading database ... 144701 files and directories currently installed.)
Preparing to replace libwbclient0 2:3.6.3-2ubuntu2 (using .../libwbclient0_2%3a3.6.25-0ubuntu0.12.04.10_amd64.deb) ...
Unpacking replacement libwbclient0 ...
Preparing to replace smbclient 2:3.6.3-2ubuntu2 (using .../smbclient_2%3a3.6.25-0ubuntu0.12.04.10_amd64.deb) ...
Unpacking replacement smbclient ...
Preparing to replace samba-common 2:3.6.3-2ubuntu2 (using .../samba-common_2%3a3.6.25-0ubuntu0.12.04.10_all.deb) ...
Unpacking replacement samba-common ...
Selecting previously unselected package samba.
Unpacking samba (from .../samba_2%3a3.6.25-0ubuntu0.12.04.10_amd64.deb) ...
Selecting previously unselected package tdb-tools.
Unpacking tdb-tools (from .../tdb-tools_1.2.9-4_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Setting up libwbclient0 (2:3.6.25-0ubuntu0.12.04.10) ...
Setting up samba-common (2:3.6.25-0ubuntu0.12.04.10) ...
Setting up smbclient (2:3.6.25-0ubuntu0.12.04.10) ...
Setting up samba (2:3.6.25-0ubuntu0.12.04.10) ...
Generating /etc/default/samba...
Importing account for nobody...ok
Importing account for wxb...ok
update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode.
smbd start/running, process 10711
nmbd start/running, process 10740
Setting up tdb-tools (1.2.9-4) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
下载完后开始配置,配置文件:sudo vim /etc/samba/smb.conf
在文件末尾添加,
添加一个wxb用户
在samba上添加权限,添加一个wxb用户
sudo smbpasswd -a wxb
输入密码
添加后需要重启samba服务,可以重启客户机,或者输入命令:/etc/init.d/samba restart (自测发现没有samba,失败,最后用的重启客户机办法)
打开运行窗口,输入服务器地址如下,输入网络凭证,刷新后成功。