Configuration Samba share

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

Ubunto 12


# aptitude install samba


1.First, edit the following key/value pairs in the [global] section of /etc/samba/smb.conf:

sudo nano /etc/samba/smb.conf


[global]


เพิ่ม สองบรรทัดเข้าไป


unix charset = UTF-8

dos charset = CP932


...


 workgroup = KSGROUP

   ...

 security = user


2.Create a new section at the bottom of the file, or uncomment one of the examples, for the directory to be shared:


[KS2.Lombard.IL]

    comment = Ubuntu File Server Share

    path = /srv/samba/KS2.Lombard.IL

    browsable = yes

    guest ok = no

    read only = no

    create mask = 0755


3.Now that Samba is configured, the directory needs to be created and the permissions changed. From a terminal enter:


mkdir -p /srv/samba/KS2.Lombard.IL

chown nobody.nogroup /srv/samba/KS2.Lombard.IL/

chmod 777  /srv/samba/KS2.Lombard.IL

4.restart the samba services to enable the new configuration:


sudo nano /etc/init/smbd.conf




edit 

#start on (local-filesystems and net-device-up)

to

start on (local-filesystems and net-device-up)



restart smbd

restart nmbd


5.Finally, Creat user for samba


useradd   gunsleep

passwd gunsleep

smbpasswd gunsleep


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


Requires Login

Loading...