CẤU HÌNH SAMBA TRÊN CENTOS 6.0 (Limited Access)
Page 1 of 1
CẤU HÌNH SAMBA TRÊN CENTOS 6.0 (Limited Access)
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
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
Bây giờ chúng ta truy cập vào samba server bằng username samba trong group security.
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.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|