Archive for the 'Networking' Category

Oct 02 2013

How to Mount SMB/CIFS network share in Linux

Published by under linux,Networking

If you have a Home NAS and if it supports SMB/CIFS shares, then follow the steps below to mount those shares in a Linux System.

Prerequisite   Linux system must have “smbfs” and cifs-utils package installed.

Mount CIFS with the default local filesystem permissions:

 # mkdir /mnt/mntpoint # mount -t cifs //server-name/share-name /mnt/mntpoint -o username=shareuser,password=sharepassword
For Example
 # mount -t cifs // /mnt/mntpoint -o username=shareuser,password=sharepassword


  • username=shareuser : specifies the CIFS user name.
  • password=sharepassword : specifies the CIFS password. If this option is not given then the environment variable PASSWD is used. If the password is not specified directly or indirectly via an argument to mount, mount will prompt for a password, unless the guest option is specified.

For further details and options, please read linux man page for mount.cifs(8). Also, please note that only root user can mount the filesystems.

If you want a particular filesystem to mounted at boot time, then enter a static information about the filesystem you want to mount in /etc/fstab.

For example, in /etc/fstab you need to enter 6 feilds

“file system to be mounted”   “mount point”  “file type”  “options”  ” dump option” “file system check (fsck) value”

//  /mnt/mntpoint cifs  username=shareuser,password=sharepassword 0 0

if you want any user to mount this file system then do the following

//  /mnt/mntpoint cifs  username=shareuser,password=sharepassword,user 0 0

if you want to provide a resolvable hostname instead of IP address, then ensure that you have cifs-utils is installed. Otherwise you will fail to mount with error code -22 . If you do a dmesg after failure you will see the below message

cifs_mount failed w/return code = -22



Comments Off on How to Mount SMB/CIFS network share in Linux

Mar 14 2008

Good Tools that aids in network application development

Published by under Networking

Good Tools that aids in network application developmentThe following are the tools that i use to debug network applications.

  1.  netcat. Click the link to download the windows version of the tool 
  2.  NemesisYou can download this tools from here

Comments Off on Good Tools that aids in network application development