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

How to use the smbclient command in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to use the smbclient command in Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Linux common commands smbclient commands belong to the samba suite, which provides a command line to interactively access the shared resources of the samba server.

Smbclient interactive access to samba server

Syntax smbclient (options) (parameters) option-B: IP address used when transmitting broadcast packets;-d: specify the level of detail of the events recorded in the record file;-E: send information to the standard error output device;-h: display help;-I: set the NetBIOS name range;-I: specify the IP address of the server;-l: specify the name of the record file -L: display all resources shared by the server;-M: use the WinPopup protocol to send information to the host specified in the option;-n: specify the NetBIOS name to be used by the client;-N: do not ask for the password;-O: set the option for the user-side TCP connection slot;-p: specify the server-side TCP connection port number;-R: set the order of NetBIOS name resolution. -s: specify the directory where the smb.conf is located;-t: set the character code to parse the file name on the server side;-T: back up all the files shared by the server and package them into tar format files;-U: specify the user name;-w: specify the workgroup name. Parameter smb server: specify the smb server to connect to.

Instance lists the shared folders provided by an IP address

Smbclient-L 198.168.0.1-U username%password uses smbclient like a ftp client

After smbclient / / 192.168.0.1/tmp-U username%password successfully executes the smbclient command, enter the smbclient environment and prompt: 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

Smbclient-c "ls" / / 192.168.0.1/tmp-U username%password and

Smbclient / / 192.168.0.1/tmp-U username%password smb:/ > ls has the same function.

Create a shared folder

Smbclient-c "mkdir share1" / / 192.168.0.1/tmp-U username%password prompts NT_STATUS_ACCESS_DENIED making remote directory / share1 if the way users share / / 192.168.0.1/tmp is read-only

This is the end of the article on "how to use smbclient commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Development

Wechat

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

12
Report