zoukankan      html  css  js  c++  java
  • smbclient 使用方法

     

       
    1,列出某个IP地址所提供的共享文件夹
    smbclient -L 198.168.0.1 -U username%password
     
    2,像FTP客户端一样使用smbclient
    smbclient //192.168.0.1/tmp  -U username
     
    执行smbclient命令成功后,进入smbclient环境,出现提示符: smb:>
    这里有许多命令和ftp命令相似,如cd 、lcd、get、megt、put、mput等。通过这些命令,我们可以访问远程主机的共享资源。
     
    3,直接一次性使用smbclient命令
    smbclient -c "ls"  //192.168.0.1/tmp  -U username%password
    smbclient //192.168.0.1/tmp  -U username%password
    smb:>ls
    功能一样的
     
    例,创建一个共享文件夹
    smbclient -c "mkdir share1"  //192.168.0.1/tmp  -U username%password
    如果用户共享//192.168.0.1/tmp的方式是只读的,会提示
    NT_STATUS_ACCESS_DENIED making remote directory share1
     
    4,除了使用smbclient,还可以通过mount和smbcount挂载远程共享文件夹
    mount -t smbfs -o  username=administrator,password=123456 //192.168.0.1/tmp  /mnt/tmp
    smbmount //192.168.0.1/tmp /mnt/tmp -o username=administrator
  • 相关阅读:
    视频解析小技巧
    linux系统路由设置
    tracert路由跟踪命令
    php+nginx
    docker快速拉取镜像
    linux命令
    添加docker命令
    linux模糊查询文件名
    查看日志
    模板函数与模板类
  • 原文地址:https://www.cnblogs.com/stephen-init/p/4310410.html
Copyright © 2011-2022 走看看