Ubuntu 12.04 搭建 SAMBA-SWAT(Samba Web 管理工具)

本文指导读者如何在Linux系统中通过一系列步骤安装并配置SWAT服务,包括使用APT包管理器安装所需组件、编辑xinetd配置文件、创建特定服务文件以及验证服务是否正确启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考了:http://linux.chinaunix.net/techdoc/net/2007/03/14/952274.shtml,对其进行了部分修改完善。

 

依次执行

1、sudo apt-get samba samba-common smbfs smbclient swat


2、apt-get install xinetd swat依赖xineed才能正常工作

 

3、修改xinetd.conf (路径位置为:root@ubuntu:/etc# vim xinetd.conf)
添加:swat stream tcp nowait.400 root /usr/sbin/tcpd \ /usr/sbin/swat

 

注意放在default 括号之外

---------------------------------------------------

root@ubuntu:/etc# cat xinetd.conf

# Simple configuration file for xinetd

#

# Some defaults, and include /etc/xinetd.d/

 

defaults

{

# Please note that you need a log_type line to be able to use log_on_success

# and log_on_failure. The default is the following :

# log_type = SYSLOG daemon info

}

includedir /etc/xinetd.d

swat stream tcp nowait.400 root /usr/sbin/tcpd \ /usr/sbin/swat

-------------------------------------------------------


4、新建swat文件 vi /etc/xinetd.d/swat
内容如下:
代码:
# description: SAMBA SWAT
service swat
{
disable = no
socket_type = stream
protocol = tcp
#should use a more limited user here
user = root
wait = no
server = /usr/sbin/swat
}


5、sudo dpkg-reconfigure xinetd


6、查看swat是否运行
运行命令: netstat -lt
如果出现tcp 0 0 *:swat *:* LISTEN,表示swat配置运行成功,正在监听

--------------------------

root@ubuntu:/etc# netstat -lt

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State      

tcp        0      0 *:swat                  *:*                     LISTEN 

---------------------------------


7、
http://localhost:901

这里使用的是IP访问

 


大功告成!

转载于:https://www.cnblogs.com/wlei/p/4834596.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值