We recommend a very good Linux Samba system with great learning value. Here I will mainly explain the application of Linux Samba system, including introduction of Linux Samba knowledge. Linux Samba server usage:
1. Check whether the Linux Samba client and server are installed:
1. check:
- [Root @ localhost ~] # Rpm-qa | grep Linux Samba
- Linux Samba-3.0.23c-2-server side
- Linux Samba-client-3.0.23c-2-Client Side
- Linux Samba-common-3.0.23c-2
RHEL5 only installs the client by default.
2. installation:
You can find the Server-side installation under the second disc Server: rpm-ivh/mnt/Server/Linux Samba-3.0.23c-2.i386.rpm and then start the Linux Samba service: Enter ntsysv in the interface space to select the smb service, confirm to leave.
3. Disable selinux:
SELinux (Security-Enhanced Linux) is a new Security subsystem on Linux & reg; for implementing mandatory access control by the National Security Agency (NAS. NSA developed an access control system with the help of the Linux community. Under the restriction of this access control system, processes can only access the files needed in their tasks. SELinux is installed on Fedora and Red Hat Enterprise Linux by default.
If SELinux is installed, the shared folder of Linux Samba cannot be accessed. We need to disable SELinux: directly modify/etc/sysconfig/selinux = disable and set setsebool-P Linux Samba_enable_home_dirs = 1 in/usr/sbin to restart the system.
Ii. Linux Samba basics:
The main configuration file of the Linux Samba service:/etc/Linux Samba/smb. password File of the confLinux Samba service:/etc/Linux Samba/smbpasswdLinux Samba Service log File:/var/log/Linux Samba /*. the permissions of log Linux Samba shared folders are jointly controlled by the Linux Samba configuration file and the folder permissions of the liunux system. Pay attention to the configuration.
3. Share Linux folders with Linux Samba
This section describes three typical configuration methods for Linux Samba: pub, which can read, write, and delete files without a password. Read-only-the password is not required, but only the file can be read. User1-requires a password to read, write, and delete files.
The procedure is as follows:
1. log on to the system as the root user.
2. Establish system users
Three new linux users, pub, read-only, and user1. You can use shell commands or graphical interfaces. Choose system> Management> user and group to complete this step. The main directories of the three users are
- /home/pub/
- /home/ read-only /
- /home/ user1/
Grant permissions respectively:
- chmod 777 pub
- chmod 755 read-only
- chmod 700 user1
3. Create three Linux Samba users
- smbpasswd –a pub
- smbpasswd –a read-only
- smbpasswd –a user1
The system will prompt you to specify the Linux Samba user password. After you specify the password, open the/etc/Linux Samba/smbpasswd file and you will see the newly added Linux Samba user.
4. Configure the main configuration file:/etc/Linux Samba/smb. con
Find the [global] node and modify security: security = share ---- remove the comment ';' and add it at the end:
- [pub]
- comment = Public Areas
- path = /home/pub
- browseable = yes
- guest ok = yes
- writable =yes
- [read-only]
- comment = Read-Only Areas
- path = /home/read-only
- browseable = yes
- guest ok = yes
- [user1]
- comment = Password Required
- path = /home/user1
- browseable = yes
- writable = yes
Save and exit
5. run Linux Samba again: run the Command service smb restart on the terminal.
4. access Shared Folders:
In the Windows file browser, we want to view the file through \ IP or domain name \ shared directory name, while in the Linux Gnome file browser, we can view smb: // domain name or IP address/shared directory name.
In this example, the three directories are accessed in windows: pub does not require the user name and password, and has the read and write permissions; read-only does not require the user name and password, and has the read-only permission; user1 requires password verification because security = share, so you do not need to verify the user name). Enter the users1 password of the Linux Samba user set in step 3 to read and write the access.
If it is set to security = user in/etc/Linux Samba/smb. conf, the shared folder must be verified by the user name and password.
- View the default Linux samba version.
- Start the installation and configuration of Linux Samba server to build
- Install services in Linux Samba and modify firewall configurations to allow access
- Teach you how to configure Sambauser sharing in Linux
- Detailed configuration scheme of linux samba Server Client