- 论坛徽章:
- 0
|
Samba服务器配置要求以及详细配置
5.8.1 Samba服务器服务器配置要求:
(1)、操作系统采用Red Hat Enterprise Linux 4;
(2)、实现Windows和Linux之间的资源共享;
(3)、Samba服务器设置部分目录公开,部分目录访问需要口令,隐藏共享目录;
5.8.2 Samba服务器详细配置:
(1)、[root@localhost ~]# vi /etc/samba/smb.conf
:58 security = user
修改Samba的主配置文件,使访问需要口令
[test] //共享目录名称
path = /test //目录路径
(2)、[root@localhost ~]# useradd yy
创建用户yy。
(3)、[root@localhost ~]# smbpasswd -a yy
将用户yy配置成Samba用户,并配置口令。
(4)、[root@localhost ~]# service smb restart
重新启动Samba服务。
(5)、[root@localhost ~]# vi /etc/samba/smb.conf
:58 security = user
[test1]
path = /test2
read only = NO
create mode = 0664
directory mode = 0777
browseable = NO
允许通过验证的用户对共享目/test2录读写,并隐藏共享目录:
6、[root@localhost ~]# mkdir –p test test1 test2 test3 test4
新建目录 test、test1、test2、test3、test4
7、[root@localhost ~]#chmod –R 777 test test1 test2 test3 test4
配置目录test、test1、test2、test3、test4为完全控制权限
(8)、[root@localhost ~]# service smb restart
重启服务
(9)、[root@localhost ~]# vi /etc/samba/smb.conf
:45 guest account = xx
[test3]
path = / test3
public = yes
[test4]
path = /test4
public = no
修改配置文件,使目录 test3打开需要口令,test4打开不需要口令:
(10)、[root@localhost ~]# service smb restart
重新启动服务
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/91996/showart_1809289.html |
|