Archive for October, 2013

Oct 20 2013

Postfix configuration tidbit

Published by under general

If you want to override a named command in, normally you can specify in the as override option (-o) to the command.
There is one quirk here though. It cannot contain any white spaces. The manual page explain this clearly. However, it is silent when it comes to parameter values that contains whitespace. There are no examples as well.

The simple trick here is to replace white space with comma as well.

For example:
….. -o smtpd_client_restrictions=check_client_access,hash:/etc/postfix/access

Please see the comma after check_client_access.

But when you use this parameter in, it will be as below
smtpd_client_restrictions=check_client_access hash:/etc/postfix/access

Comments Off on Postfix configuration tidbit

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