Redhatlinux9.0 samba settings

Source: Internet
Author: User
Article title: redhatlinux9.0 samba configuration details. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The redhat linux9.0 configuration has finally been completed. for most veterans, it may be very simple, but for new users
I still feel a little complicated, so I want to write down the configuration process in detail and hope it will be helpful for new users.
1. install samba
Verify that samba has been installed on your machine
Rpm-qa | grep samba. if
Samba-common-2.2.7a-7.9.0
Samba-client-2.2.7a-7.9.0
Samba-2.2.7a-7.9.0
Congratulations! you have installed samba. if you don't have any of the above, please install it. the installation method is simple, redhat
The first disk in linux 9.0 contains // cdrom/RedHat/RPMS/
The following is my detailed installation process
Put the first disc into the optical drive, and it will be automatically mounted, saving you the need to mount it by yourself
# Cd/mnt/cdrom/RedHat/RPMS (case-sensitive letters; otherwise, errors may occur)
# Rpm-ivh samba-common-2.2.7a-7.9.0 (this must be installed first, the installation does not have to write all the following samba-common-2.2.7a-7.9.0, such as writing to samba-c, press a few times more Tab key, it's easy)
# Rpm-ivh samba-2.2.7a-7.9.0
# Rpm-ivh samba-client-2.2.7a-7.9.0 (client)
After installing the above things, basically it can be, but in order to facilitate the configuration and the use of REDHAT LINUX9.0 new features, I suggest installing the following two Dongdong redhat-config-samba-1.0.4-1, samba-swat-2.2.7a-7.9.0 disc has, the redhat-config-samba-1.0.4-1 in the first disc, the samba-swat-2.2.7a-7.9.0 in the second disc, the installation method and the above the same.
  
Through the simple introduction above, I think you have installed it. experiment with it.
# Rpm-qa | grep samba)
Redhat-config-samba-1.0.4-1
Samba-common-2.2.7a-7.9.0
Samba-client-2.2.7a-7.9.0
Samba-swat-2.2.7a-7.9.0
Samba-2.2.7a-7.9.0
OK. the installation is successful! (It is recommended that you install the above items on your own. if there is one installed on the system, uninstall it first to deepen your impression. if there is a problem with the installation after the system is uninstalled, it may be because you have not completely uninstalled the instance. the solution is to continue searching for uninstallation or force installation)
2. configuration
(1) method 1
Use our installed redhat-config-samba-1.0.4-1 for configuration as follows:
Start ---> System settings ---> server configuration ---> samba Server
(I wrote this article in LINUX, so I won't cut down the graphics, so I have to give it a simple explanation)
Preference --> server settings. here you can make some basic settings for the samba Server. it should be said that it is relatively simple. I don't know how to introduce it. After configuration, remember to restart the service.
There are two restart methods:
# Service smb start or restart
#/Etc/rc. d/init. d/smb start
(2) method 2
Using samba-swat-2.2.7a-7.9.0
First, you need to modify the swat configuration file, which is disabled by default.
Service swat
{
Port = 901 (the port used by swat is 901)
Socket_type = stream (something similar to the tcp protocol)
Wait = no
Only_from = 127.0.0.1 (only starting swat from this, key !)
User = root (name used to start swat)
Server =/usr/sbin/swat
Log_on_failure + = USERID
Disable = yes (yes must be changed to no)
}
After modification, start xinetd.
The startup method is the same as what I just mentioned.
Then press enter in the browser: http: // 127.0.0.1: 901! (Note: This IP address must be the same as the IP address in the SWAT configuration file. remember !)
As for how to use swat, it should not be a problem to explore it. after the configuration is complete, remember to restart the service. by the way, to enable samba and swat to start at each boot, you can:
# Setup, and then find the system service. run the * command before SMB and SWAT. you can also run the # ntsysv command to achieve the same effect.
(3) method 3
Using samba-2.2.7a-7.9.0, this is the most fundamental thing, no matter what tool, master its principle is the most important, like web page production, although a lot of tools, but must be familiar with HTML language, A good web page that can be edited! Haha)
After the samba-2.2.7a-7.9.0 is installed, the file will be formed under/etc/samba/
Smb. conf smbpasswd smbusers lmhosts. if none of them exist, you can create
Modify the smb. conf file
I just want to make a simple description: guest OK is the same as public, and read only and writable are the opposite, there is no difference
Workgroup = (working group name, fill in your current LAN working group)
Netbios =)
Client code page = 936 (the default value is 850,936, which is in simplified Chinese. Remember, do you not remember that the Chinese names under your windows system are all ???, This is because you didn't add-o iocharset = cp936 !)
Guest account = nobody (guest account, which is related to the shared file cheek defined by you, where nobody exists in smbusers)
Security = SHARE (there are four levels, not to mention)
Encrypt passwords = Yes (the encrypted password. the password sent by win98/2000 is encrypted, so yes is required here)
The above is the content of [global]. In fact, there are a lot of things, and the level is limited.
The following is what you want to share. it should be noted that the attributes of folder sharing depend on the permission settings of the file cheek in LINUX.
[Myxfc]
Comment = myxinfc
Path =/home/xinfc
Read only = No
Guest OK = Yes
  
  
[Tmp]
Path =/home
Valid users = hehl
Write list = @ staff
Read only = No
Guest OK = Yes
The sharing setting is actually very simple, mainly because of the path and permission issues. The two are clear and should be okay.
  
I have finished the introduction and restarted the service!
Maybe you will find that the client cannot be connected. Grandma's, it's really annoying, busy for so long, still cannot be accessed, why?
1) the client should install TCP/IP netbios ipx (this stuff is not familiar)
2 lmhosts. the IP address corresponds to the netbios name.
3) iptables (this is the worst thing, because of him, I wasted two days! I come up with a small conclusion that iptables is disabled before various configurations !)
Because I don't know much about iptables, there are two solutions:
1: # setup, select firewall, and disable
2. modify/etc/sysconfig/iptables
-A input-j RH-Lokkit-0-50-INPUT
-A forward-j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT-I lo-j ACCEPT
-A RH-Lokkit-0-50-INPUT-p tcp-m tcp -- dport -- syn-j ACCEPT
-A RH-Lokkit-0-50-INPUT-p tcp-m tcp -- dport 2049 -- syn-j REJECT
-A RH-Lokkit-0-50-INPUT-p udp-m udp -- dport-j ACCEPT
-A RH-Lokkit-0-50-INPUT-p udp-m udp -- dport 2049-j REJECT
-A RH-Lokkit-0-50-INPUT-p tcp-m tcp -- dport 6000: 6009 -- syn-j REJECT
-A RH-Lokkit-0-50-INPUT-p tcp-m tcp -- dport 7100 -- syn-j REJECT
COMMIT
Change the REJECT of the two rows at to ACCEPT.
Restart the firewall.
# Service iptables start
This should be done. it is recommended that you practice it more. as you are a newbie, you may be laughed at in many places. but what I want to tell you is that I study LINUX seriously, I have made so many things in one breath that I want to eat, hey
If you have any questions, please contact me: qq: 26072953 msn: myxfc@hotmail.com
  
  
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.