Redhat5 configure samb service process

Source: Internet
Author: User
Redhat5 configures the samb service many times in redhat. because of the long interval between the two times, you can configure the smb service by searching for information, sometimes the information you find on the Internet may not work. this time, the configuration starts from 0 on a system without the smb service installed ,... redhat5 configures the samb service many times in redhat. because of the long interval between the two times, you can configure the smb service by searching for information, sometimes the information you find on the Internet may not work. this time, the configuration starts from 0 on a system without an smb service, and is recorded. later configuration will follow this. My environment is: uname-a display: Python code Linux my.server.com 2.6.18-238. el5 #1 SMP Sun Dec 19 14:24:47 EST 2010 i686 i686 i386 GNU/Linux 1. check whether the smb service Python code rpm-qa is installed in the system. | grep samb can be seen if samb is listed package starting: the Python code samba-common-3.0.33-3.29.el5_5.1 samba-client-3.0.33-3.29.el5_5.1 samba-3.0.33-3.29.el5_5.1 instructions are installed, and if not listed, instructions are not installed. In fact, you can also check the system service and check whether there is an smb service in the service to determine whether the service is installed. Check the system service. you can use the Java code setup --> system service 2. check that the installation service is not installed by Step 1. this step shows the installation process, which is relatively simple, you can find the installation package, which can be downloaded from the network, or installed from the disc media, preferably from the disc media. this is comprehensive because the dependent package is required to be installed during the installation process, all media are available on the CD. The installation process is as follows: a. mount the optical drive Python code mount-t iso9660/dev/cdrom/mnt/cdrom B. go to the Server directory of the disc to install and list the samb package in the disc: python code ls-l samb * lists the results: java code-r -- 171 root 17016953 2010-09-14 samba-3.0.33-3.29.el5_5.1.i386.rpm-r -- 107 root 5952463 samba3x-3.5.4-0.70.el5.i386.rpm-r -- 107 root 15646045 samba3x-client-3.5.4-0.70.el5.i386.rpm-r -- 107 root 172727 03 samba3x-common-3.5.4-0.70.el5.i386.rpm-r -- 107 root 8460962 2010-12-07 samba3x-doc-3.5.4-0.70.el5.i386.rpm-r -- 107 root 38410 2010-12-07 samba3x-domainjoin-gui-3.5.4-0.70.el5.i386.rpm-r -- 107 root 3699917 samba3x-swat-3.5.4-0.70.el5.i386.rpm-r -- 137 root 4319348 samba3x-winbind-3.5.4-0.70.el5.i386.rpm-r -- 13 7 root 15505 samba3x-winbind-devel-3.5.4-0.70.el5.i386.rpm-r -- 171 root 5938214 2010-09-14 samba-client-3.0.33-3.29.el5_5.1.i386.rpm-r -- 219 root 7046933 2010-09-14 samba-common-3.0.33-3.29.el5_5.1.i386.rpm-r -- 171 root 8630505 2010-09-14 samba-swat-3.0.33-3.29.el5_5.1.i386.rpm do not know which to install first, it doesn't matter, a look at it, the samba-3.0.33-3.29.el5_5.1.i386.rpm must be installed, just install it first: Python code rpm-ivh samba-3.0.33-3.29.el5_5.1.i386.rpm this time will prompt the need to install the dependent package, and then follow the prompts one by one to package the dependency, it is OK. 3. after the configuration service is installed, configure and set the access permission a and edit smb. conf file: Python code vi/etc/samb/smb. conf shift + G to the end of the file, open the [public] comment and modify it as follows: Python code # A publicly accessible directory, but read only, when T for people in # the "staff" group [public] comment = Public Stuff path =/home/pub public = yes writable = yes printable = no write list = + staff where path is provide external access directories, here I am/home/pub, and wq is used to save B and add access users. here I add a pub User Python code smbpasswd. -A pub follow the prompts to enter the password to create the pub directory c under/home and start the Python code service smb start of the smb service. then, access the service from outside through \ ip. D. enable startup. If startup is enabled, Hook the smb service (setup --> system service --> smb) in the system service. 4. Note that after the above steps, still inaccessible. it may be that the system has installed a firewall to disable the firewall. Python code service iptables stop if \ ip can be opened but the pub directory cannot be accessed, it may be caused by forced access control of SELinux and SELinux disabled, python code vi/etc/selinux/config set SELINUX to disabled and comment out SELINUXTYPE as follows: Python code # This file controls the state of SELinux on the system. # SELINUX = can take one of these three values: # enforcing-SELinux security policy is enforced. # permissive-SELinux prints warnings instead of enforcing. # disabled-SE Linux is fully disabled. SELINUX = disabled # SELINUXTYPE = type of policy in use. possible values are: # targeted-Only targeted network daemons are protected. # strict-Full SELinux protection. # SELINUXTYPE = targeted after selinux is modified, you need to restart init 6. After restart, you can access it.
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.