CẤU HÌNH SAMBA TRÊN CENTOS 6.0 (Limited Access)

Post new topic   Reply to topic

View previous topic View next topic Go down

CẤU HÌNH SAMBA TRÊN CENTOS 6.0 (Limited Access)

Post  chantroitinhoc on Mon Sep 26, 2011 12:54 pm

Sau khi các bạn đã cấu hình được Samba Sever với Fully Access, chúng ta tiếp tục với lab cấu hình giới hạn truy cập với user trong samba:

Tạo group security
[root@dns ~]# groupadd security

Tạo thư mục data
[root@dns ~]# mkdir /home/data

Cấp quyền owner cho group security trên thư mục data
[root@dns ~]# chgrp security /home/data

Phân quyền trên thư mục data
[root@dns ~]# chmod 770 /home/data

Chỉnh sửa tập tin smb.conf:
[root@dns ~]# vi /etc/samba/smb.conf

Code:

# line 102: change
security = user

# add at the last line
[Data]                                                        # any name you like
  path = /home/data
  writable = yes
  create mode = 0770
  directory mode = 0770
  share modes = yes
  guest ok = no
  valid users = @security                            # allow only security group


Khởi động lại dịch vụ smb:
[root@dns ~]# /etc/rc.d/init.d/smb restart

Tạo user truy cập samba:
[root@dns ~]# useradd samba
[root@dns ~]# smbpasswd -a cent # add a user in Samba

Add user samba vào group security:
[root@dns ~]# vi /etc/group

Code:

security:x:502:cent                                  # add


Bây giờ chúng ta truy cập vào samba server bằng username samba trong group security.

chantroitinhoc
Admin

Posts: 126
Join date: 2008-01-16

View user profile http://chantroitinhoc.niceboard.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You can reply to topics in this forum