Centos 5.5 Samba Server Installation Summary

Source: Internet
Author: User
Tags domain name server

Centos 5.5 Samba Server Installation Summary
First, we will introduce the basic content. Windows and Linux share mainly use Samba servers. SMB stands for Server Message Block, it is a file sharing, printer service, domain name resolution, verification, provided between Linux OS/2 windows and windows for workgroup and other computers, the network communication protocol SMB for services such as authorization and browsing is mainly in the C/S structure.
Samba has so many functions, mainly because it has many software packages,

The main program of smbd Samba can process client connections, files, authorized users, and names.
Nmbd NetBIOS Domain Name Server, which helps the client locate the server to browse and manage the domain. Currently, these functions are already in Samba.
Testprns test the server access Printing Program
Test the correctness of Samba configurations.
Smbclient runs the SMB client program on a unix host.
Main configuration file of smb. conf samba
Smbprint batch processing of running files allows UNIX hosts to send printing work to SMB servers using smbclient.

1. Yum install Samba // install the RPM package to automatically resolve the dependency problem. If you want to query rpm-Qa | grep samba, you can

2. If you want to separately install rpm-IVH samba-xx.xx... rpm

3. Choose either/etc/rc. d/init. d/SMB start or service SMB start. Close and stop.

4. Check the Samba server status with/etc/rc. d/init. d/SMB status.
If smbd and nmdb are running, it indicates that it has been started.

5. If you want to automatically run ntsysv at the next boot, select SMB and press the asterisk, chkconfig -- level 3 SMB on

Configure the Samba server

Set/etc/services file content
VI/etc/services
Check whether there is # In front of NetBIOS. If yes, there are 6 NetBIOS prefixes.

Set the/etc/samba/lmhost File
This file provides the ing between host names and IP addresses.
IP address host alias (NetBIOS name)
127.0.0.1 localhost
XXX. XXX centos1
XXX. XXX centos2

After modifying/etc/services,/etc/samba/lmhost, set the main configuration file.
For the/etc/samba/smb. conf file, refer to the default configuration.

[Global]
Workgroup = stationx.example.com
NetBIOS name = centos

Server String = Samba Server
Printcap name =/etc/printcap
Load printers = Yes
Cups Options = raw
Log File =/var/log/samba/% m. Log
Max log size = 50


[Homes]
Comment = home directories // home directory comment
Browseable = No // whether other users are allowed to browse their personal directories. We recommend that you disable
Writable = Yes // whether to allow writing to the Home Directory
Valid users = % S // user allowed to log on, % s indicates the user logged on to the directory
Create mode = 0664 // default permission for creating a file
Directory mode = 0775 // default permission for creating a directory

[Netlogon]
Path =/usr/local/samba/lib/netlogon // actual local path to be accessed
Guest OK = Yes // do you need a password during connection?

Writable = No
Share modes = No

[Profiles]
Path =/usr/local/samba/profiles
Browseable = No
Guest OK = Yes

[Printers]
Comment = all printers
Path =/var/spool/samba
Browseable = No
Public = Yes
Guest OK = No
Writable = No
Printable = Yes

[TMP]
Path =/tmp
Read Only = No
Public = Yes

[Public]
Comment = Public stuff
Path =/home/samba
Public = Yes
Writable = Yes
Printable = No
Write list = @ staff

Modify it to smb. conf and copy it to/etc/samba/. Then testparm is used to test whether the syntax is correct.

If loaded services file is OK

/Etc/rc. d/init. d/SMB restart


Client \ IP address if the user name and password are entered, the actual Linux Password cannot be used for Logon. Because the samba password is different from the Linux User Password, mksmbpasswd. Sh can be used to establish
CAT/etc/passwd | mksmbpasswd. Sh>/etc/samba/smbpasswd
Ls-L/etc/samba/smbpasswd

Smbpasswd-a user name

You can also use the SWAT web page for management.

This article is from "something with lofty aspirations !" Blog, please be sure to keep this source http://zh888.blog.51cto.com/1684752/382952

Centos 5.5 Samba Server Installation Summary

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.