Skip to main content

Mount windows shares on linux

Any windows share can be mounted on linux easily. Cifs network protocol is used for mounting windows shares. smbclient package is also required.

first install samba-client package
# yum install samba-client
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package samba-client.x86_64 0:3.0.33-3.29.el5_5.1 set to be updated
--> Processing Dependency: samba-common = 3.0.33-3.29.el5_5.1 for package: samba-client
--> Running transaction check
---> Package samba-common.x86_64 0:3.0.33-3.29.el5_5.1 set to be updated
--> Processing Dependency: libsmbclient = 3.0.33-3.29.el5_5.1 for package: samba-common
--> Running transaction check
---> Package libsmbclient.x86_64 0:3.0.33-3.29.el5_5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package                          Arch                       Version                           Repository              Size
 samba-client              x86_64                3.0.33-3.29.el5_5.1                  my                  5.7 M
Installing for dependencies:
 libsmbclient               x86_64                3.0.33-3.29.el5_5.1                  my                  916 k
 samba-common         x86_64                3.0.33-3.29.el5_5.1                  my                  6.8 M

Transaction Summary
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 13 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): libsmbclient-3.0.33-3.29.el5_5.1.x86_64.rpm                             | 916 kB     00:00     
(2/3): samba-client-3.0.33-3.29.el5_5.1.x86_64.rpm                            | 5.7 MB     00:00     
(3/3): samba-common-3.0.33-3.29.el5_5.1.x86_64.rpm                       | 6.8 MB     00:00     
Total                                                                            24 MB/s |  13 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libsmbclient                                                                        1/3 
  Installing     : samba-common                                                                  2/3 
  Installing     : samba-client                                                                       3/3 

  samba-client.x86_64 0:3.0.33-3.29.el5_5.1                                                                                         

Dependency Installed:
  libsmbclient.x86_64 0:3.0.33-3.29.el5_5.1              samba-common.x86_64 0:3.0.33-3.29.el5_5.1                       


then mount windows share
# mount -t cifs -o username=testuser //testsever/testshare /testmount

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00              26G  2.7G   22G  11% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                1006M     0 1006M   0% /dev/shm
//testserver/testshare             219G  158G   62G  72% /testmount


Popular posts from this blog

Creating Multiple VLANs over Bonding Interfaces with Proper Routing on a Centos Linux Host

In this post, I am going to explain configuring multiple VLANs on a bond interface. First and foremost, I would like to describe the environment and give details of the infrastructure. The server has 4 Ethernet links to a layer 3 switch with names: enp3s0f0, enp3s0f1, enp4s0f0, enp4s0f1 There are two bond interfaces both configured as active-backup bond0, bond1 enp4s0f0 and enp4s0f1 interfaces are bonded as bond0. Bond0 is for making ssh connections and management only so corresponding switch ports are not configured in trunk mode. enp3s0f0 and enp3s0f1 interfaces are bonded as bond1. Bond1 is for data and corresponding switch ports are configured in trunk mode. Bond0 is the default gateway for the server and has IP address Bond1 has three subinterfaces with VLAN 4, 36, 41. IP addresses are,, respectively. Proper communication with other servers on the network we should use routing tables. There are three

Sending Jboss Server Logs to Logstash Using Filebeat with Multiline Support

In addition to sending system logs to logstash, it is possible to add a prospector section to the filebeat.yml for jboss server logs. Sometimes jboss server.log has single events made up from several lines of messages. In such cases Filebeat should be configured for a multiline prospector. Filebeat takes lines do not start with a date pattern (look at pattern in the multiline section "^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}" and negate section is set to true ) and combines them with the previous line that starts with a date pattern. server.log file excerpt where DatePattern: yyyy-MM-dd-HH and ConversionPattern: %d %-5p [%c] %m%n Logstash filter: