Simplified installation and use of samba in Centos, centossamba

Source: Internet
Author: User

Simplified installation and use of samba in Centos, centossamba

Samba is very powerful, but in actual work, CleverCode has fewer functions. The main use is to access the/home/CleverCode directory on the Linux machine in windows. Therefore, the CleverCode is only simple to install, and then the/home/CleverCode directory is shared to a windows disk.

1 Introduction Samba is a software that allows Linux systems to Apply Microsoft network communication protocols, while SMB is short for Server Message Block, that is, Server Message Block, SMB is mainly used as Microsoft's network communication protocol. Samba then applied the SMB communication protocol to the Linux system, forming the current Samba software. Later, Microsoft renamed smb cifs (Common Internet File System), a public Internet File System, and added many new features, this makes Samba more powerful.
Samba can be used for file sharing and print sharing between Linux and windows systems. Samba can be used for file sharing between windows and Linux, it can also be used for resource sharing between Linux and Linux. Because NFS (Network File System) can well achieve data sharing between Linux and Linux, therefore, Samba is mostly used for data sharing between Linux and windows.


2 Installation

1) ensure that common libraries are required for linux installation. Otherwise, a bunch of errors may occur.
Installation of common support libraries in Linux: http://blog.csdn.net/clevercode/article/details/45438401


2) install yum
# Yum install-y samba-client samba-swat


3) view the installation status

# Rpm-qa | grep samba




4) configure the firewall
# Vi/etc/sysconfig/iptables


-A input-m state -- state NEW-m tcp-p tcp -- dport 139-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 445-j ACCEPT
-A input-m state -- state NEW-m udp-p udp -- dport 137-j ACCEPT
-A input-m state -- state NEW-m udp-p udp -- dport 138-j ACCEPT


# Service iptables restart


5) start (start: service smb start; stop: service smb stop; restart: service smb restart)
# Service smb start


6) view the running status

# Service smb status




7) Add a Centos system user, User name: CleverCode, and password: clevercode123456. (Skip this step if the Centos system user already exists)
# Useradd CleverCode
# Passwd CleverCode


8) Add a samba user. Username: CleverCode, and password: 123456789. (The user name must be the same as the System user name, And the password can be different)
# Smbpasswd-a CleverCode




Common smbpasswd commands:

Smbpasswd-a adds users (the users to be added must be system users)
Smbpasswd-d: the user cannot be logged on.
Smbpasswd-e restores the user and restores the user so that the frozen user can use
Smbpasswd-n sets the user's password to null.
To write null passwords-true in global
Smbpasswd-x delete user

9) in windows, open computer =, ing network drive ]. Enter \ 192.168.142.130 \ CleverCode in the file. 192.168.142.130 configure the IP address of the samba server Centos above.



10) enter the user name CleverCode and password 123456789.



11) view the shared/home/CleverCode directory in windows. Click the following USB flash drive. You can operate the/home/CleverCode directory in Centos.




Copyright:

1) original works, from "CleverCode blog", Please note the following original address when reprinting; otherwise, the copyright will be held legally liable.

2) original address: http://blog.csdn.net/clevercode/article/details/46238441 (reprint must indicate the address ).

3) Linux commonly used software installation and configuration-Directory: http://blog.csdn.net/clevercode/article/details/45740431 (directory continuous updates, please add to favorites ).

4) blog column address (Linux commonly used software installation and configuration): http://blog.csdn.net/column/details/linuxsoftwareinstall.html (blog continues to increase, Attention Please favorites ).

5) Welcome to my blog for more highlights: http://blog.csdn.net/clevercode.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.