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

大功告成!

最新文章

  1. http升https笔记
  2. 【Alpha版本】冲刺-Day9
  3. 快排java实现
  4. MiniCrowler
  5. Android 实现卫星菜单
  6. JavaScript案例三:动态显示时间
  7. MySQL 查看表结构
  8. Core OS 层
  9. 排列组合相关算法 python
  10. 201521123079《java程序设计》第13周学习总结
  11. bzoj3831 [Poi2014]Little Bird 单调队列优化dp
  12. 单元测试_JUnit常用单元测试注解介绍及代码演示
  13. Android的Databinding-单向绑定
  14. ReactNative学习笔记(一)环境搭建
  15. Consul服务器配置
  16. JVM垃圾回收器之G1(Garbage First)--new
  17. Hadoop-2.2.0中文文档——Common-Hadoop HTTP web控制台认证
  18. 2014年辛星解读Javascript之DOM之事件及其绑定
  19. iOS - 开发中调试小技巧
  20. 1588. [HNOI2002]营业额统计【平衡树-splay 或 线段树】

热门文章

  1. 编写高质量代码改善C#程序的157个建议——建议58:用抛出异常代替返回错误代码
  2. JAVA自动装箱拆箱与常量池
  3. delphi让exe开机自启动
  4. js中的arguments 参数
  5. 独立部署GeoWebCache
  6. Android日期时间选择器DatePicker、TimePicker日期时间改变事件响应(Android学习笔记)
  7. 封闭类------新标准c++程序设计
  8. Kotlin 函数和函数表达式
  9. shell传参给matlab问题解决办法
  10. 深度学习TensorFlow常用函数