Samba协议-winexe连接CentOS6和Windows7

Winexe

准备工作,samba服务器

这里有一篇特别好的文章

http://blog.csdn.net/splenday/article/details/47116969

在centOS上面库里有,修改配置文件

  • 编辑 /etc/samba/smb.conf ,滚动到 Share Definitions 部分,默认的配置文件会为所有用户在 HOME 目录建立一个共享。但是需要进行下面配置用户才能登录:
/etc/samba/smb.conf

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   valid users = %S
  • 添加用户,注意这个用户必须是存在的用户
sudo smbpasswd -a qjx
  • 启动
sudo service smb start

1. 在CentOS 6中安装Winexe

因为在CentOS的yum库中并没有自带Winexe,所以需要我们自己找库安装

rpm -Uvh nux-dextop-release-0-2.el6.nux.noarch.rpm
  • yum安装winexe
yum install winexe

2. 关闭两边的防火墙

  • CentOS 6
sudo service iptables stop
  • Windows

手动关闭

3. 连接Windows并执行ipconfig

winexe -U qjx%password//host "ipconfig"
posted @ 2020-05-13 16:19  dreamOnly  阅读(289)  评论(0编辑  收藏  举报