Two perfect steps to configure the samba service in RHEL 4

Source: Internet
Author: User

Samba is the implementation of many services and protocols, it includes NetBIOS, SMB, CIFS, DCE/RPC on TCP/IP or, more specifically, MSRPC, a WINS server, NT domain protocol suite. RHEL 4 is a stable system. configuring samba in RHEL 4 is a necessary task.

1. Configure the samba server and client during samba in RHEL 4

1. samba Server Installation
# Rpm-qa | grep samba // four packages are installed by default on the first 2nd disks)

2. samba Server Configuration

1) The main configuration file, located in/etc/samba/smb. conf
# More/etc/samba/smb. conf // view the smb. conf file
# Grep-v "^ #"/etc/samba/smb. conf | grep-v "^;" // remove comments and view Samples
◆ [Global] // global settings, effective for the entire samba Server
◆ [Homes] // user shared directory attribute, with a priority higher than the global setting
◆ [Printers] // printer shared resource attributes

2) samba user account and user directory settings:
A)/etc/samba/smb. conf has the following default settings, which do not need to be modified.
[Homes]
Comment = Home Directories // shared directory description
Browseable = no // samba user visibility when the main directory is not logged on
Writable = yes // write permission settings for the Home Directory

B) Create a samba User Account
# Useradd telata // create a system user account
# Smbpasswd-a telata // create a samba User Account
# Cat/etc/samba/smbpasswd // view the File Content
Note: smbpasswd command:-h help),-a to add an account),-d to disable an account),-e to enable an account)-x to delete an account, without adding a parameter to change the password)

3) add public directory settings: any user that appears as a nobody has read and write permissions on the public directory

# Mkdir/home/public
# Chown nobody: nobody/home/public // edit the owner Group of the Directory
# Vi/etc/samba/smb. conf // edit smb. conf to add [public] shared resources
[Public]
Path =/home/public // set the RHEL 4 system directory corresponding to the shared directory
Public = yes // visibility into samba users, yes
Only guest = yes // The user uses the shared directory as a guest, that is, nobody
Writable = yes // The shared directory is writable to users. yes

4) Test the smb. conf file configuration
# Testparm // check the syntax of the configuration file and display the configuration list (processed)

5) Start the samba Service
# Ll/etc/init. d/smb // location of the Startup Script
# Service smb start //

3. install and use the samba client
The client package is samba-client and contains the management commands for running the samba client.

1) The smbclient command is similar to telnet and ftp)
# Smbclient-L 10.0.0.1 // display the list of shared resources on the specified server
# Smbclient // 10.0.0.1/telata-U telata // specify the directory in which the user logs on to the specified server

2) smbstatus command
# Smbstatus // display the connection status of the samba server on the current host

3) smbmount command
# Smbmount // 192.168.1.2/public/mnt // mount the shared directory to RHEL 4 System
# Mount | tail-1 // view mounting content
Or run the following command to mount the file system.-t specifies the file system, and-o specifies the user name.
# Mount-t smbfs-o username = telata // 192.168.1.2/public/mnt
# Mount | grep smb // view the mount content

2. file sharing between Windows host and RHEL 4 host during samba Configuration
1. Windows host access samba Server
// 192.168.1.2 // use UNC, which is the same as accessing windows

2. RHEL 4 hosts can access Windows shared files)

1) run the smbclient command to connect to the share directory of Windows. The winuser is the windows user name.
# Smbclient // 192.168.1.123/share-U winuser

2) use the mount command to mount the Windows shared directory
# Mount-t smbfs-o username = winuser // 192.168.1.123/share/mnt

These services and protocols provided by samba are often incorrectly classified as NetBIOS or SMB. Samba can also be used to share a printer. Therefore, configuring the samba service in RHEL 4 is a necessary step, and we hope it can help you configure the samba service in RHEL 4.


  1. Set up the Samba server of ORACLE11g with RHELRHEL 5
  2. Rhelrhel ftp Server SETUP steps and Problem Analysis (1)
  3. RHELRHEL 5 is a perfect combination of FTP
  4. Problem Analysis: in this way, use RHELRHEL 4 to configure Postfix in four perfect steps
  5. Seven steps for RHEL to set up RHEL4 system Sendmail

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.