April 22, 2014

How To Install and Configure SAMBA Server on RHEL 6



The default configuration works just fine.


Having 'security = user' means we need a UNIX account. Lets create one.

And set samba password for account.



Now lets test it from a remote client. First lets list all shares on host.

And to mount it.

Finally lets test to write to winuser1 home directory.

This did not go well. The missing configuration is SELinux.


On the SAMBA server, run the following command, if you want to share home directories via samba.

Now lets get back to client and un mount and the remount and write and read and that should be successful.

Different Way to Mount NFS in RHEL6


The below will auto mount the user 'ldapuser1' home directory with rw permission on nfs.server.com.


You can manually mount a nfs exported directory to a local directory /remote.

Mount at boot

How to Install and Configure NFS Sharing on RHEL 6


To get nfs to work we need to install and start rpcbind and nfslock. Double check that is done.

Now we are ready to start NFS.

Finally lets test our new NFS server.

This will return a empty export list, without error.


To be able to access NFS exports remotely, we need to open certain ports in the firewall. To investigate which one, we use the command rpcinfo.

This will return quite some ports. To lock down which port that are used please uncomment all ports in NFS conf file.

Now restart NFS service and lets start open ports.

And after opening all ports the iptables should look like.

Test your new firewall configuration by from remote client execute command.


After we have successfully configured the firewall, lets back to our server and configure NFS export directories. We start with creating a new directory, that we will exports.

Now configure NFS to export it.

To apply the new changes run

And to list current exports


From a second machine on the same LAN, test connectivity to NFS server (

The simplest way to test read and write is to use the automounting functionality.

April 21, 2014

How to Install Chrome on Ubuntu 14.04 LTS (Trusty)

Open a Terminal and run the commands.

Add the public key for the Google repo.

Add the Google repo for the chome package.

Update and install chrome web browser.

April 14, 2014

How To Configure KVM Virtual Machine Network


Here I will configure a KVM host with virtual machines to be accessible from a local network.

This can be achieved in two ways by configure on KVM host machine:

  • A network bridge
  • Configure iptables as a router, which will forward traffic to virtual machines.

The easiest way is to use a network bridge, since then both desktop and virtual machines will be on the same subnet.


Here we will configure the KVM host machine network configuration, manually, so we start by disable the NetworkManager

KVM Host Network Bridge Configuration


Above we have disabled NetworkManager (NM_CONTROLLED=no) and is using a Bridge.


Above have we configured a static IP (BOOTPROTO=none) and assigned IP, Gateway and DNS.

KVM Host iptables

Since we are not using the second alternative with routing, the KVM host machines iptables configuration is the same as default.

After editing/creating files you might need to restore SELinux security contexts.

And finally restart network on KVM host

Virtual Macines Network Configuration

The last part is to configure the virtual machine network. This is easiest achieved with the virt-manager.

For an existing virtual machine.

And for a new.

Inside the Virtual Machine

Inside the virtual machine you can configure either a static IP or a dynamic one. The easiest way is to use the tool system-config-network-tui.


And finally test to ping the virtual machine (virtual1) from the desktop.