@breakerthb
2016-09-05 01:16
字数 715
阅读 1589
Linux
$ smbclient -L 198.168.0.1 -U username%password
或
$ smbclient -L 198.168.0.1 -U username
$ smbclient //192.168.0.1/tmp -U username%password
执行smbclient命令成功后,进入smbclient环境,出现提示符:
smb:\>
这里有许多命令和ftp命令相似,如cd、lcd、get、megt、put、mput等。通过这些命令,我们可以访问远程主机的共享资源。
$ 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
$ 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