1. Check the installation package
#rpm –qa | grep Samba
The following installation results are required
samba-3.0.25;samba-common-3.0.25;samba-client-3.0.25;samba-swat-3.0.25.
2. Configure Samba services by modifying configuration files
In the Samba server, we generally need to manually set up Samba's shared file path, access rules, and so on, briefly described below. We can add a paragraph at the bottom of the smb.conf file:
#vi/etc/samba/smb.conf
[Public] # ' [public] ' is a shared directory name, after a shared resource is published, the directory that holds the shared resource becomes a shared directory, and a share name must be defined for the shared directory;
Comment = xy # "comment" is a description of the shared resource, which makes it easy for users to distinguish between shared files, where the definition is set to "XY";
Path =/usr/share/jw # "path" is the absolute path to the shared file, for example, where the path is set to "path =/USR/SHARE/JW";
public = yes # the "public" row can set whether the shared resource allows anonymous access, set to "Yes" to allow anonymous access, and set to "No" to prohibit anonymous access;
readonly = yes # "ReadOnly" behavior to set the file read, set "yes" for read-only, and set to "No" to indicate that it can be read and write.
#service SMB Restart
Shutting down SMB services: [OK]
Shutting down NMB services: [OK]
Starting SMB services: [OK]
Starting NMB services: [OK]
3. Setting up Access users
For the account that accesses the Samba server, you need to first establish the same name System account in the system, if you want to create a samba account named "Jianw", you need to first establish a system named
System user for "Jianw". The command to create a samba account is "Smbpasswd-a user name". After entering the command, you also need to set up your Samba account password, and the Samba account password can be inconsistent with your system account password. As follows:
[Email protected]/]# smbpasswd-a JIANW
New SMB Password:retype new SMB Password:
User name and password information is usually stored in the/ETC/SAMBA/SMBPASSWD,
Each time a user accesses a Samba server, the information submitted by the user is compared to the information saved by the SMBPASSWD.
A connection is established with the client to allow client access. If the smbpasswd file is not found in the/etc/samba,
Because Samba enables Tdbsam authentication, you can modify the "Passdb backend = Tdbsam" of the smb.conf file
Line, and then add "smb passwd file =/etc/samba/smbpasswd".
4. Turn on Samba services
OK, now usually the basic configuration is complete, you can open the service of Samba server, with the command
Service SMB start or/ETC/RC.D/INIT.D/SMB start, as follows:
[[Email protected]/]# service SMB start
Start the SMB service: [OK] start the SMB service: [OK]
In this way, the samba service is already turned on, and now it needs to shut down the system Firewall and command iptables–f. Etc/rc.d/init.d/iptables Stop shutting down the firewall now, you can access the Samba server through the Windows client. In IE or "run" Input: \\172.16.23.165\public, enter the user name and password to verify, you can enter the Samba server share directory.
Samba profile Common parameters detailed: http://yuanbin.blog.51cto.com/363003/115761/
Redhat 5 Samba configuration