Total download size: 618 k
Installed size: 2.0 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : samba-client-4.8.3-4.el7.x86_64 1/1
Verifying : samba-client-4.8.3-4.el7.x86_64 1/1
Installed:
samba-client.x86_64 0:4.8.3-4.el7
Complete!
[root@centos76_3 ccx]#
- 网络源如下
查看共享
smbclient -L windowsIP
:查看共享目录,如果不指定用户就默认管理员用户admin。
smbclient -L windowsIP -U 用户名
:指定用户名查看
smbclient -L windowsIP -U 用户名%密码
:不用再次输入密码就直接查看了
[root@centos76_3 ccx]# smbclient -L 192.168.59.131 # 如果修改过默认admin名称的,就会报错【直接指定用户名即可】
Enter SAMBA\root’s password:
session setup failed: NT_STATUS_ACCESS_DENIED
[root@centos76_3 ccx]# smbclient -L 192.168.59.131 -U ccx1 #指定用户名
Enter SAMBA\ccx1’s password:
Sharename Type Comment
ADMIN$ Disk 远程管理
C Disk
C$ Disk 默认共享
gongxiang Disk 共享
IPC$ IPC 远程 IPC
Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.59.131 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 – no workgroup available
[root@centos76_3 ccx]#
[root@centos76_3 ccx]# smbclient -L 192.168.59.131 -U ccx%ccx #指定用户名并输入密码
Sharename Type Comment
ADMIN$ Disk 远程管理
C Disk
C$ Disk 默认共享
gongxiang Disk 共享
IPC$ IPC 远程 IPC
Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.59.131 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 – no workgroup available
[root@centos76_3 ccx]#
- 使用有2中方式,1:直接登录 , 2:挂载
直接登录共享
- 命令格式:
smbclient //主ip/路径 -U 用户名%密码
如,smbclient //192.168.26.1/D -U tom%111111
【注:windows中是\IP,linux中是//IP】
[root@centos76_3 ccx]# smbclient //192.168.59.131/C -U ccx%ccx #登录
Try “help” to get a list of possible commands.
smb: > ls #查看远程目录【我进入的共享C盘】
$Recycle.Bin DHS 0 Fri May 7 16:57:04 2021
bootmgr AHSR 395268 Fri Jul 10 19:00:31 2015
BOOTNXT AHS 1 Fri Jul 10 19:00:31 2015
Documents and Settings DHS 0 Fri Jul 10 20:21:38 2015
gongxiang D 0 Mon May 10 18:09:05 2021
pagefile.sys AHS 10200547328 Fri Apr 30 17:10:08 2021
PerfLogs D 0 Fri Jul 10 19:04:22 2015
Program Files DR 0 Fri Apr 30 17:07:40 2021
Program Files (x86) DR 0 Fri Jul 10 19:04:26 2015
ProgramData DH 0 Fri Apr 30 17:07:40 2021
Recovery DHS 0 Fri Apr 30 16:57:02 2021
swapfile.sys AHS 268435456 Fri Apr 30 17:10:08 2021
System Volume Information DHS 0 Mon May 10 10:27:16 2021
Users DR 0 Fri Apr 30 17:10:23 2021
Windows D 0 Fri Apr 30 16:59:13 2021
78514687 blocks of size 4096. 73498041 blocks available
smb: > pwd # 查看远程目录,如果想看本地路径,!pwd
Current directory is \192.168.59.131\C\
- 这种方式登录进去以后需要使用命令来进行操作
使用以下参数【在smb:\>
环境中(登录成功就这界面)】:
-
ls
#同dir, 列出远程目录 -
!ls
#列出本地目录【linux】 -
pwd
#查看当前工作目录 -
get
# 下载单个文件 -
mget
# 批量下载 -
put
#单个上传 -
mput
#批量上传 -
?
#各种交互命令的在线帮助 -
help
-
lcd目录<