Saturday, August 9, 2014

unknown job `servicename`

unknown job error ubuntu

Service is installed but when you try to start, stop or restart, it gives you unknown job error. 
If you are facing this problem in root account, here is the solution.

Use sudo with your command but there should be no need to use sudo in root account. Use sudo and if your command is executed successfully, it means you have not created alias for sudo.

Add this line in .bashrc file of root.
alias service="sudo service"
You will find the file here i.e. /root/.bashrc

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.