The Samba Project is an open source project that supports Linux, UNIX, and other UNIX-like operating systems
and Windows
interoperability. Samba is included in most Linux distributions and is typically installed and configured to support Linux systems to join and interoperate with an existing Windows® workgroup or domain, often as a Common Internet File System (CIFS) file server for use by Windows
systems. The Samba 4.x installation also allows the Samba server to act as an Active Directory Domain Service controller and an integrated Domain Name System for the Windows
domain.
Although the Samba server provides an excellent mechanism for providing Linux resources from Windows systems, allowing Linux systems to print to Windows printers, if you are only interested in occasionally retrieving files from WIndows shares, install and configure Samba. The server may be overkill. The Samba client package (samba-client) contains several utilities designed for this type of occasional interaction, including the smbclient application, which provides an interactive command line interface (CLI) for remote access to Windows shares.
If you are unsure of the share name provided on the remote Windows server, you can use the smbclient application to query a server and type the -L option after the server's name or IP address to list the available resources on that server. As shown in Listing 1.
Listing 1. Listing Windows server resources using smbclient
$ smbclient -U barlowliu -L Barlow-pcEnter barlowliu's password:Domain=[CKING] OS=[Windows 7 Professional 7601 Service Pack 1 ] Server=[Windows 7 Professional 6.1]
Sharename Type Comment--------- -----------ADMIN$ Disk Remote Management C$ Disk Default Share D$ Disk Default Share E$ Disk Default Share F$ Disk Default Share IPC$ IPC Remote IPCsoft DiskDomain=[CKING] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1]
Server Comment --------- -------BARLOW-PC
Workgroup Master--------- -------CKING BARLOW-PCMSHOME PC-20100408VZXVWORKGROUP CKINGACC
Note: -U specifies the username for remote login, and -L specifies the Windows server.
After determining the name of the share you wish to connect to (such as the soft share above), you can use the smbclient application to connect to a specific share to check or retrieve the file, as shown in Listing 2.
Listing 2. Retrieving files from a Windows share using smbclient
$ smbclient -U barlowliu //barlow-pc/softEnter barlowliu's password:Domain=[CKING] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1]smb: \\> ls. D 0 Wed Mar 27 10:01:01 2013.. D 0 Wed Mar 27 10:01:01 2013OS D 0 Sat Apr 27 17: 13:50 2013 Office Software D 0 Wed Mar 27 14:11:32 2013 Instant Messaging D 0 Wed Mar 27 09:53:40 2013 Database D 0 Mon Jun 3 08:59:15 2013 Browser D 0 Wed Mar 27 09 :53:59 2013 system tools D 0 Wed Apr 24 15:24:18 2013
37501 blocks of size 4194304. 21943 blocks available
smb: \\> cd system tools smb: \\ System Tools\\> ls. D 0 Wed Apr 24 15:24:18 2013.. D 0 Wed Apr 24 15:24:18 2013Dell Server Software D 0 Wed Apr 24 14:22:40 2013Hypertrm D 0 Thu Mar 28 14 :53:33 2013NSCP-0.4.1.90-x64.msi A 29418492 Sun Apr 7 17:19:56 2013putty D 0 Wed Mar 27 09:27:36 2013vnc-4_1_3-x86_win32.exe A 741744 Wed Oct 15 17:14: 08 2008Windows Loader v2.2.1 D 0 Tue Jan 29 14:33:00 2013
37501 blocks of size 4194304. 21943 blocks availablesmb:\\system tools\\> get NSCP-0.4.1.90-x64.msigetting file \\system tools\\NSCP-0.4.1.90-x64.msi of size 29418492 As NSCP-0.4.1.90-x64.msi (836.7 KiloBytes/sec) (average 836.7 KiloBytes/sec)
The example in Listing 2 shows that smbclient provides a CLI to connect to a remote server. This interface supports familiar Linux commands such as cd (for moving in a directory on a remote server) and ls (for listing the contents of a given directory). Once you find the file you want to retrieve, you can retrieve it using the get command and store it in the directory where you want to execute smbclient . To store the retrieved files in another directory, use the lcd (local change directory) command to change the directory that smbclient considers to be the current directory.
If you only need to occasionally access one or more files in a Windows share, and don't care about using a file manager (such as Gigolo, GNOME Nautilus, KDE Dolphin, Konqueror, or Thunar) to graphically browse Windows shares , then you can safely use the smbclient application. The smbclient application enables a remote share to be used in the context of the application, not in your entire system. To browse a Windows share and make it available to the application of your choice, you must mount the share to your system in the same way that you mount the local file system.
There is no doubt that Red Hat is indeed the choice of many companies considering Linux, but in rece
Before downloading the files on the Linux machine via FTP, upload it after the Windows editing, so
How to effectively perform Linux patch management Red Hat LinuxOSRHEL patch can be installed throug
System Requirements: Unlimited release, requires PC platform (x86 architecture CPU), Glibc version
Preparation before Linux system installation
Installing rpm file package under Linux
The 20 advantages of Linux and Windows
How to optimize after the Linux server is installed?
How to install phpmyadmin under Linux
How to use cacti to get the custom information sent by snmp? Figure
Do not blame the actual Linux operating system dual screen display
Explain in detail how the Linux operating system kills the process
Linux awk array operation details
The basics of vsftp installation and configuration in CentOS
Talk about the common sense and common problems of sleep and hibernation in Windows7 system
How to set the storage space of IE temporary files in Win8
Using Win disk to install Win8 dual system graphic tutorial (1)
ReadyBoost function + mobile storage device Speed up the small 7 system (3)
Also talk about the use of Ghost's multicast function to manage the school room
Three easy ways to solve IE7 or IE8 can not access FTP
Say goodbye: Farewell to Win10 no longer retains the function
Win7 system appears mobile hard disk can not pop up what to do
The reason why CPU resources occupy 100% under Win7 is
Whether the Win10 system needs to install rst (Rapid Storage Technology) test analysis