Linux系统下用smbclient命令来访问Windows共享(转)
1、 访问c$共享:[root@rh root]# smbclient //192.168.60.188/c$ -U cmwPassword:??????????????????????????????????????????smb: \> cd winnt???????????????????????????????????smb: \winnt\>2、 访问temp共享(启用guest帐户)[root@rh root]# smbclient //192.168.60.188/tempPassword:(未输入任何密码)smb: \>3、 访问temp共享(未启用guest帐户)[root@rh root]# smbclient //192.168.60.188/tempPassword:(未输入任何密码)Anonymous login successful????????????????????tree connect failed: NT_STATUS_ACCESS_DENIED??[root@rh root]#扩展研究:1、 smbclient命令成功后,可以使用的命令及研究:[root@rh root]# smbclient //192.168.60.188/temp -U cmw???????????????????Password:????????????????????????????????????????????????????????????????smb: \> ?????????????????????????????????????????????????????????????????? ? altname archive blocksize cancelcd chmod chown del dirdu exit get help historylcd link lowercase ls maskmd mget mkdir more mputnewer open print printmode promptput pwd q queue quitrd recurse reget rename reputrm rmdir setmode symlink tartarmode translate !以上为可以使用的命令,常用命令如下:1)??????? ?命令smb: \> ? ???????????????????????????????????????????HELP ?:????????????????????????????????????????????????????? [command] give help on a command?????????????语法:? [command]功能:可以查看一个命令的使用方法2)??????? cd命令smb: \> ? cd?????????????????????????????????????????HELP cd:???????????????????????????????????????????????????? [directory] change/report the remote directorysmb: \> cd samba?????????????????????????????????????语法:cd [directory]功能:改变远程目录3)??????? du命令smb: \samba\> ? du????????????????????????????????????????????????HELP du:????????????????????????????????????????????????????????????????? <mask> computes the total size of the current directorysmb: \samba\> du42293 blocks of size 1048576. 5098 blocks availableTotal number of bytes: 16880894???????????????????????????????????语法:du功能:统计当前目录下文件总计大小,不包括子目录容量。
?