Detailed process of setting up Samba server in RHEL 5

Source: Internet
Author: User

Setting up Samba in RHEL 5 is easier than other systems. Next we will describe how to set up Samba in RHEL 5, in addition, it makes a simple comparison with the construction of Samba servers in other systems.

To share files with windows in RHEL 5, nfs can be used on RHEL 5, but related software must be installed on windows, this software is generally charged! Therefore, this method is not highly practical. Is there a better solution? The answer is yes. The following describes the more practical method.

Network File Sharing between windows hosts is achieved through the CIFS service of Microsoft. CIFS is the abbreviation of CommonInternetFileSystem, you can directly access the shared folders of other hosts on the network from a windows host. The most typical application of CIFS is to find and access shared files from other hosts in "Network neighbors.

All windows hosts have been using SMB/CIFS network protocols to share files and print resources. Because SMB/CIFS is Microsoft's proprietary protocol, it cannot communicate directly with the RHEL 5 system until the Samba project appears. By setting up Samba under RHEL 5 and using Samba client software, two-way file sharing between RHEL 5 Host and widows host can be fully realized.
Here is a brief introduction to the Samba construction process under RHEL 5:
◆ [Root @ Linserv ~] # Rpm-qa | grepsamba
◆ [Root @ Linserv ~] # Mount/dev/cdrom/mnt
Mount: blockdevice/dev/cdromiswrite-protected, mountingread-only
◆ [Root @ Linserv ~] # Rpm-ivh/mnt/Server/samba-3.0.23c-2.i386.rpm
Warning:/mnt/Server/samba-3.0.23c-2.i386.rpm: HeaderV3DSAsignature: NOKEY, keyID37017186
Error: Faileddependencies:
Samba-common = 0: 3. 0.23c-2isneededbysamba-3.0.23c-2.i386
◆ [Root @ Linserv ~] # Eject
◆ [Root @ Linserv ~] #! Mou
Mount/dev/cdrom/mnt
Mount: blockdevice/dev/cdromiswrite-protected, mountingread-only
◆ [Root @ Linserv ~] # Rpm-ivh/mnt/Server/samba-common-3.0.23c-2.i386.rpm
Warning:/mnt/Server/samba-common-3.0.23c-2.i386.rpm: HeaderV3DSAsignature: NOKEY, keyID37017186
Preparing... ######################################## ### [100%]
1: samba-common ##################################### ###### [100%]
◆ [Root @ Linserv ~] # Mount/dev/cdrom/mnt
Mount: blockdevice/dev/cdromiswrite-protected, mountingread-only
◆ [Root @ Linserv ~] # Rpm-ivh/mnt/Server/samba-3.0.23c-2.i386.rpm
Warning:/mnt/Server/samba-3.0.23c-2.i386.rpm: HeaderV3DSAsignature: NOKEY, keyID37017186
Preparing... ######################################## ### [100%]
1: samba ####################################### #### [100%]
◆ [Root @ Linserv ~] # Vi/etc/samba/smb. conf
[Global]
Workgroup = MYGROUP
Serverstring = SambaServer
Security = user
Loadprinters = yes
Cupsoptions = raw
Logfile =/var/log/samba/% m. log
Maxlogsize = 50
Dnsproxy = no
[Homes]
Comment = HomeDirectories
Browseable = no
Writable = yes
[Printers]
Comment = AllPrinters
Path =/usr/spool/samba
Browseable = no
Guestok = no
Writable = no
Printable = yes
[Public]
Path =/home/public
Public = yes
Onlyguest = yes
Writeable = no
◆ [Root @ Linserv ~] # Servicesmbstart
StartingSMBservices: [OK]
StartingNMBservices: [OK]
◆ [Root @ Linserv ~] # Mkdir/home/public
◆ [Root @ Linserv ~] # Chownnobody: nobody/home/public/
◆ [Root @ Linserv ~] # Vi/home/public/test.doc
◆ [Root @ Linserv ~] # Useraddsamba1
◆ [Root @ Linserv ~] # Useraddsamba2
◆ [Root @ Linserv ~] # Tail/etc/passwd
Rpc: x: 32: 32: PortmapperRPCuser: // sbin/nologin
Sshd: x: 74: 74: Privilege-separatedSSH:/var/empty/sshd:/sbin/nologin
Rpcuser: x: 29: 29: RPCServiceUser:/var/lib/nfs:/sbin/nologin
Nfsnobody: x: 65534: 65534: AnonymousNFSUser:/var/lib/nfs:/sbin/nologin
Pcap: x: 77: 77:/var/arpwatch:/sbin/nologin
A: x: 500: 500:/home/a:/bin/bash
B: x: 501: 501:/home/B:/bin/bash
Virtual: x: 502: 502:/home/ftpsite:/bin/bash
Samba1: x: 503: 503:/home/samba1:/bin/bash
Samba2: x: 504: 504:/home/samba2:/bin/bash
◆ [Root @ Linserv ~] # Cat/etc/samba/smbpasswd
◆ [Root @ Linserv ~] # Smbpasswd-asamba1
NewSMBpassword:
RetypenewSMBpassword:
Addedusersamba1.
◆ [Root @ Linserv ~] # Smbpasswd-asamba2
NewSMBpassword:
RetypenewSMBpassword:
Addedusersamba2.
◆ [Root @ Linserv ~] # Cat/etc/samba/smbpasswd
Samba1: 503: ccf9155e3e7db%aad3b435b51404ee: 3DBDE697D71690A769204BEB12283678: [U]: LCT-4921594C:
Samba2: 504: ccf9155e3e7db%aad3b435b51404ee: 3DBDE697D71690A769204BEB12283678: [U]: LCT-4921595B:

 

 

 


◆ [Root @ Linserv ~] # Mount/dev/cdrom/mnt
Mount: blockdevice/dev/cdromiswrite-protected, mountingread-only
◆ [Root @ Linserv ~] # Rpm-ivh/mnt/Server/samba-client-3.0.23c-2.i386.rpm
Warning:/mnt/Server/samba-client-3.0.23c-2.i386.rpm: HeaderV3DSAsignature: NOKEY, keyID37017186
Preparing... ######################################## ### [100%]
1: samba-client ##################################### ###### [100%]
◆ [Root @ Linserv ~] # Umount/mnt
◆ [Root @ Linserv ~] # Mount-ousername = administrator // 192.168.0.21/Inetpub/mnt
Password:
◆ [Root @ Linserv ~] # Ls/mnt
AdminScriptswwwroot
◆ [Root @ Linserv ~] #

 

 

The above is how to build Samba under RHEL 5 to complete the communication between windows and RHEL 5. Therefore, the establishment of Samba under RHEL 5 is very important for RHEL 5.

 

  1. Set ORACLE11g to enable and disable with RHEL5
  2. RHEL-guided troubleshooting
  3. RHEL configuration NIS Network Information Service instance (1)
  4. Problem Analysis: Is it legal to use RHEL like this?
  5. Vi syntax highlighting in RHEL5

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.