The main purpose of the Samba service configuration is to share the Windows operating system with Linux files. Its main configuration process is as follows:
1 "The service of Samba is built under Linux
Note: The current process needs to be configured with the root account
This is the way to install the TAR package, the installation package for samba-3.2.0.tar.gz.
Unzip the compressed package under the user's current working directory
Execute command TAR-XZVF samba-3.2.0.tar.gz, the corresponding folder will be generated locally, the author here is samba-3.2.0
Let's go into the/samba-3.2.0/source/directory cd/samba3.2.0/source/
Execute instructions./configure
Then execute make and makes install, and the Samba folder will appear in the/usr/local/directory after all the waiting is complete
Then the cd/home/ubuntu/samba/example/directory (Ubuntu here is the author's username)
Then copy the file Smb.conf.default to the/usr/local/samba/lib/directory, modify the file name to Smb.conf, and execute the command CP smb.conf.default/usr/local/samba/lib/ Smb.conf
Then go into the/usr/local/samba/lib/directory and back up the smb.conf to perform CP smb.conf./smb.conf.bak
If you want to start the service normally, you need to go to the/etc/directory, add/usr/local/samba/lib to the end of the ld.so.conf file, and then run the ldconfig command to update the system's library files. The entire process of configuring the Samba service can be completed.
2 "File sharing related environment configuration
Create a new folder under the current user working directory share execute command mkdir share
Change permissions on a folder chmod 777 share
When entering into/usr/local/samba/, add the following configuration to the end of the file smb.conf
[Home]
Path =/home/
browseable = yes
Available = yes
Public = yes
Guest OK = yes
writable = yes
chmod 777/home
Restart NMBD and SMBD
Refer to other instructions on the Web for specific parameter meanings
At this point, enter the/usr/local/samba/sbin/working directory, execute the./smbd-d and./nmbd-d, and complete the start of the samba service.
Go to the/usr/local/samba/bin/directory, execute./smbclient-l 192.168.0.33-u ubuntu (the actual IP address of the local server), test configuration is successful or not.
Note: The Ubuntu user here is both a user of the system and a user of samba. If it is not added, you can perform the./smbpasswd-a Ubuntu, as prompted to enter the password settings to complete the addition of samba users.
3 "Accessing Linux shared Folders in Windows
In the Computer Bar in window, click "Map Network Drive" to complete the mapping of the shared folder.
4 "Accessing Windows shared files in Linux
Mount-t cifs-o username= "Lijun", password= "12345"//192.168.0.31/download/mnt
At this point, complete the configuration process.