Configuration Samba share

By admin at 2017-09-29 • 0 collector • 1559 pageviews

CentOS 6


1.First we have to create a directory in /home


# mkdir /home/SMB1.Phoenix.AZ

# chmod 777 /home/SMB1.Phoenix.AZ



2. Now we have to install the samba package.


# yum install samba  -y



3. Now we have to configure the /etc/samba/smb.conf


# nano /etc/samba/smb.conf





netbios name = yourhostname 



[global]


unix charset = UTF-8  

dos charset = CP932


workgroup = ksgroup

netbios name = mail

name resolve order = bcast host lmhosts wins

map to guest = Bad User

preferred master = yes

os level = 65

printcap name = cups

cups options = raw

use client driver = yes

server string = ""

usershare allow guests = Yes

usershare max shares = 100

usershare owner only = False

wide links = Yes



..

..


[SMB1.Phoenix.AZ]

  path = /home/SMB1.Phoenix.AZ

  writable = yes

  create mode = 0777

  directory mode = 0777

  share mode = yes



4.  Now set the selinux to permissive or disable it.


# setenforce 0 <---- this setting will remove if you reboot

# nano /etc/selinux/config


5. Now restart the services.


# service smb restart

# service nmb restart

# chkconfig smb on

# chkconfig nmb on 


6. Now configure the firewall 


# system-config-firewall-tui <--- for terminal

# system-config-firewall


7.Finally, Creat user for samba


sudo useradd   gunsleep

sudo passwd gunsleep

sudo smbpasswd -a gunsleep     <<<< ---  อย่าลืมสวิทซ์  -a  


***  sudo nano /et c/passwd    for make user right


REBOOT

====================================================


Requires Login

Loading...