Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the smbclient command of linux to access the client program of the SMB/CIFS server

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the use of linux smbclient command to access the SMB/CIFS server client program, I believe that most people do not know much, so share this article for you to learn, I hope you will learn a lot after reading this article, let's go to learn the method!

SMB and CIFS are server communication protocols, which are often used in Windows95/98/NT and other systems. Smbclient (samba client) allows Linux systems to access resources shared by Windows systems.

Syntax format: smbclient [parameters]

Common parameters:

-L displays all resources shared by the server-U specifies the user name-s specifies the directory where the smb.conf is located-O sets the option of the user-side TCP connection slot-N do not ask for the password

Reference example

List the shared folders provided by an IP address:

[root@linuxcool] # smbclient-L 198.168.0.1-U username%password

Use smbclient like a ftp client:

[root@linuxcool ~] # smbclient / / 192.168.0.1/tmp-U username%password

After successfully executing the smbclient command, enter the smbclient environment and the prompt appears: smb:/ >

There are many commands similar to ftp commands, such as cd, lcd, get, megt, put, mput, and so on. Through these commands, we can access the shared resources of the remote host.

Direct one-time use of smbclient commands:

[root@linuxcool ~] # smbclient-c "ls" / / 192.168.0.1/tmp-U username%password

Or:

[root@linuxcool ~] # smbclient / / 192.168.0.1/tmp-U username%password smb:/ > ls

Create a shared folder:

[root@linuxcool] # smbclient-c "mkdir share1" / / 192.168.0.1/tmp-U username%password above is all the contents of the client program that uses the smbclient command of linux to access the SMB/CIFS server. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report