(1) Installation
Java code
- # yum-y Install Samba
- Installed:
- samba.i686 0:3.6. 9-169.el6_5
- # pdbedit-a RENSN
- New Password:123456
- Retype New password:123456
- ......
(2) Home folder
Java code
- # Mkdir/etc/skel/samba
- # Mkdir/home/rensn/samba
- # chown Rensn:rensn/home/rensn/samba
(3) Shared Folders
Java code
- # Mkdir/home/samba
- # chown Nobody:nobody/home/samba
(4) Setting
Java code
- # Cp/etc/samba/smb.conf/etc/samba/smb.conf.bak
- # vi/etc/samba/smb.conf
- [Global]
- Unix charset = utf-8 # <= Linux encoding
- DOS charset = CP932 # <= windows encoding
- Display CharSet = utf-8 # <= Linux encoding
- SMB ports = 139 # <= Port
- Workgroup = FUGA # <= The workgroup name of Windows
- The hosts allow = 127. 192.168.21. # <= only allow local network access
- Load printers = no # <= sharing printer is not allowed
- Disable SPOOLSS = yes
- printing = BSD
- [Homes]
- Comment = Home directories
- Path =%h/samba # <= home folder Paths/home/<user>/samba
- browseable = No
- writable = yes
- [Public]
- Comment = Public Stuff
- Path =/home/samba
- Public = yes
- writable = yes
- Only guest = yes
(5) Start-up service
Java code
- #/ETC/RC.D/INIT.D/SMB Start
- #/ETC/RC.D/INIT.D/NMB Start
(6) Confirm
After you create a new file from Windows system access
Java code
- # Ll/home/rensn/samba
(7) SWAT
Installation
Java code
- # yum-y Install Samba-swat
Set up
- # Vi/etc/xinetd.d/swat
- Service SWAT
- {
- Port = 901
- Socket_type = Stream
- wait = no
- Only_from = 127.0. 0.1 192.168. 21.0/
- user = root
- Server =/usr/sbin/swat
- Log_on_failure + = USERID
- Disable = yes
- }
Confirm
Access via browser: https://<youripaddress>:901/
Build CentOS 6 Server (a)-Samba