How to set the Samba File Server to use a Windows Client
According to the Samba project website, Samba is an open-source/free software suite that provides seamless file and print services to SMB/CIFS clients. Different from other SMB/CIFS network protocol deployments (such as HP-UX LM servers, OS/2 LAN servers, or VisionFS), Samba (and its source code) is freely available (end users do not have to pay), allows interoperability between Linux/Unixt server and Windows/Unix/Linux client.
For these reasons, Samba runs on different operating systems (except Linux) the preferred File Server solution in a Coexistence Network-the most common structure is that multiple Microsoft Windows clients access the Linux server installed with Samba, which is also the problem to be solved in this article.
Note that, on the other hand, if our network is only composed of Unix-based clients (such as Linux, AIX, or Solaris, we can consider using NFS (although Samba is still an optional solution in this case), which can provide faster speed.
------------------------------------ Split line ------------------------------------
How to share files with Samba in Ubuntu 14.04
The speed of accessing samba from Ubuntu dual Nic of VMWare Virtual Machine doubles
Add the Samba File Sharing Server to the Windows Server 2003 Domain
Samba installation Configuration
Samba service configuration in CentOS 6.2
How to Build the Win7 + VMware + Fedora18 Samba Server
------------------------------------ Split line ------------------------------------
Install Samba In Debian and CentOS
Before we start the installation, we can use the package management system in the operating system to query Samba information:
On Debian:
- # Aptitude show samba
On CentOS:
- # Yum info samba
On the following screen, we can see the output of 'Aptitude show samba '('yum info samba' produces similar results ):
Now let's install Samba (the following installation is from the Debian 7 [Wheezy] server ):
On Debian:
- # Aptitude install samba
On CentOS:
- # Yum install samba
Add a user to Samba
For versions earlier than 4.x, you need to create a local Unix account to add it to Samba:
- # Adduser <username>
Next, we need to add the user to Samba and use the smbpasswd command with the '-a' option to complete the process. This command indicates that the user name will be added to the local smbpasswd file. We will be prompted to enter the password (the password does not need to be the same as the password of the Local Unix account ):
- # Smbpassword-a <username>
Finally, we will grant the user xmodulo the access permission to a directory on our system. This directory will be used for Samba sharing of this user (if necessary, can also be shared to other users ). To do this, use a text editor (such as Vim) to open/etc/samba/smb. conf file, navigate to the end of the file, and create a block with the description name (enclose it with square brackets), such as [xmodulo]:
- # SAMBA SHARE
- [Xmodulo]
- Path =/home/xmodulo
- Available = yes
- Valid users = xmodulo
- Read only = no
- Browseable = yes
- Public = yes
- Writeable = yes
We must restart Samba now-just in case-use the testparm command to check the syntax error of the smb. conf file:
- # Service samba restart
- # Testparm
If an error occurs, it is reported after testparm is completed.
Map Samba sharing to a network drive on a Windows 7 Computer
Right-click the computer and select ing network drive ":
Enter the IP address of the machine on which Samba is installed, followed by the shared name (that is, the name enclosed in brackets in the smb. conf file), and then make sure that "Connect with different creden" is selected ":
For more details, please continue to read the highlights on the next page: