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

参考了: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