安装 SWAT
首先,通过 yum 在线安装 SWAT 。
[root@sample ~]# yum -y install samba-swat ← 在线安装 SWAT
Setting up Install Process
Setting up repositories
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 74 kB 00:00
update : ################################################## 214/214
Added 2 new packages, deleted 0 old in 0.99 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for samba-swat to pack into transaction set.
samba-swat-3.0.10-1.4E.9. 100% |=========================| 87 kB 00:00
---> Package samba-swat.i386 0:3.0.10-1.4E.9 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
samba-swat i386 3.0.10-1.4E.9 base 6.5 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 6.5 M
Downloading Packages:
(1/1): samba-swat-3.0.10- 100% |=========================| 6.5 MB 00:20
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: samba-swat ######################### [1/1]
Installed: samba-swat.i386 0:3.0.10-1.4E.9
Complete!
配置 SWAT
1、用vi编辑器编程/etc/xinetd./swat,保存并退出;
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \\
# to configure your Samba server. To use SWAT, \\
# connect to port 901 with your favorite web browser.
service swat
{
disable = yes
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}
将disable =yes 改为 disable = no;
修改only_from = 127.0.0.1为注释或者删除
2、启动服务
/etc/init.d/xinetd start 或者 service xinetd start
3、在主机或者其它网络内计算机的浏览器输入 http://192.168.1.124:901
其中192.168.1.124对应开启samba服务的IP,901端口就是swat内默认的端口
4、在出现的对话框中输入User name: root Password: ,密码为自己root密码
也可以是其它用户来登陆和配置。
5、登陆Web配置界面,进行samba配置。