Build CentOS 6 Server (a)-Samba

Source: Internet
Author: User

(1) Installation
Java code
    1. # yum-y Install Samba
    2. Installed:
    3. samba.i686 0:3.6. 9-169.el6_5
    4. # pdbedit-a RENSN
    5. New Password:123456
    6. Retype New password:123456
    7. ......


(2) Home folder
Java code
    1. # Mkdir/etc/skel/samba
    2. # Mkdir/home/rensn/samba
    3. # chown Rensn:rensn/home/rensn/samba


(3) Shared Folders
Java code
    1. # Mkdir/home/samba
    2. # chown Nobody:nobody/home/samba


(4) Setting
Java code
  1. # Cp/etc/samba/smb.conf/etc/samba/smb.conf.bak
  2. # vi/etc/samba/smb.conf
  3. [Global]
  4. Unix charset = utf-8 # <= Linux encoding
  5. DOS charset = CP932 # <= windows encoding
  6. Display CharSet = utf-8 # <= Linux encoding
  7. SMB ports = 139 # <= Port
  8. Workgroup = FUGA # <= The workgroup name of Windows
  9. The hosts allow = 127.  192.168.21. # <= only allow local network access
  10. Load printers = no # <= sharing printer is not allowed
  11. Disable SPOOLSS = yes
  12. printing = BSD
  13. [Homes]
  14. Comment = Home directories
  15. Path =%h/samba # <= home folder Paths/home/<user>/samba
  16. browseable = No
  17. writable = yes
  18. [Public]
  19. Comment = Public Stuff
  20. Path =/home/samba
  21. Public = yes
  22. writable = yes
  23. Only guest = yes


(5) Start-up service
Java code
    1. #/ETC/RC.D/INIT.D/SMB Start
    2. #/ETC/RC.D/INIT.D/NMB Start


(6) Confirm
After you create a new file from Windows system access
Java code
    1. # Ll/home/rensn/samba


(7) SWAT

Installation
Java code
    1. # yum-y Install Samba-swat


Set up
  1. # Vi/etc/xinetd.d/swat
  2. Service SWAT
  3. {
  4. Port = 901
  5. Socket_type = Stream
  6. wait = no
  7. Only_from = 127.0. 0.1 192.168. 21.0/
  8. user = root
  9. Server =/usr/sbin/swat
  10. Log_on_failure + = USERID
  11. Disable = yes
  12. }


Confirm
Access via browser: https://<youripaddress>:901/

Build CentOS 6 Server (a)-Samba

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.