Samba is successfully run (verified)

Source: Internet
Author: User
Run samba (verified) linux version: centos5.5 test environment: vmware7.0.1www.2cto.com first install sambayum-yinstallsamba1, log on with root, check installation Samba service check Samba service package is installed: www.2cto... run samba (verified) linux: centos5.5 test environment: vmware 7.0.1 www.2cto.com first install samba yum-y install samba 1 and log on as the root user, check the installation of the Samba service and check whether the Samba service package is installed: www.2cto.com rpm-qa | grep samba. if not, install three apm packages. 2. disable the selinux policy getenforce // if the result is Enforcing, it indicates that the security policy is running vi/etc/sysconfig/selinux // permanently disabling the selinux policy, which is very important! Change enforcing to disabled and temporarily disable it to setenforce 0 3. to manually add a user, ensure that the user exists in Linux. step: useradd xiaohongpasswd xiaohongsmbpasswd-a xiaohong // In this step, add Samba user 4 and set the password file. this setting is used to import the system user (/etc/passwd) in Linux to the samba password file (/etc/samba/smbpasswd) cat/etc/passwd | mksmbpasswd. sh>/etc/samba/smbpasswd 5, configure/etc/samba/smb. conf file. here, only xiaohong has the permission to access samba. Although the file content is large, there are not many changes: vi smb. conf workgroup = WORKGROUP // workgroup name [xiaohong] comment = xiaohong path =/var/samba/xiaohong public = yes writable = yes 6, create a shared folder mkdir-p/var/samba/xiaohongchown xiaohong: xiaohong/var/samba/xiaohong // you must set the access permission for this folder because it can only be used by xiaohong. chmod 700/var/samba/xiaohong // The folder belongs to the xiaohong user and can only be accessed by the xiaohong user. 7. test and start the Samba server. to start samba at startup, set setup and enable the smb service in system options. Testparm // test service smb start pstree | grep mbd // check whether it is enabled. do not forget to close the centos firewall (execute the setup command to close) 8. access Samba from Windows. use "network neighbors" to access the service. username: access xiaohong from linux. you must switch to xiaohong to log on. // After two weeks of hard work, the configuration is successful. the above steps have been verified by myself.
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.