Saturday, August 9, 2014

ubuntu - root login not possible through ssh

ubuntu 14.04 - Enable root login for ssh

If you are trying to log into root account of ubuntu system using ssh and you are getting permission denied error. You are quite sure that your password is correct but still you are facing this error. It means root account is disabled for ssh.
Follow the steps to enable it.

Open file /etc/ssh/sshd_config on your ubuntu system.
Replace line
PermitRootLogin without-password
with
PermitRootLogin yes
Restart ssh.
Now try to log into root account using ssh.

Friday, July 4, 2014

Postfix : Port 25 is not opened in Linux, opened in firewall

Port 25 is not in opened port list

If you have installed postfix mail server and port 25 is not visible in opened port list. 
Have you opened it in iptables ( firewall ) ?
The line should be included in iptables.
-A INPUT -p tcp -m state -m tcp --dport 25 --state NEW -j ACCEPT

Yes, Yes, it is opened in firewall. I do not want this solution. 
Okay Okay

Open configuration file of postfix. /etc/postfix/main.cf
Check the parameter inet_interface, it should be
inet_interface=all
Now restart postfix again. It will be listed in opened port list.

lvm device not found in /dev/mapper

lvm device is missing. lvm Volume status is not available. Missing Volume.

If you are not able to find your logical volume (lvm device), check the status of the device or volume.
Run command
lvdisplay
If LV status is Not Available, it will not be listed in /dev/mapper or your lvm device directory.
Make the status available, Run command
vgchange -a y
It makes status available of all volumes.

Now the device will be visible in /dev/mapper or your lvm device directory.
Mount the device using
mount -t ext4 /path/of/the/lvm/device /path/of/mounted/location
Suppose I want to mount vg-lv_home in /home, I run
mount -t ext4 /dev/mapper/vg-lv_home /home
Now I can see all my files of the volume in /home