Monday 15 April 2013

To Adduser on ec2- instance and login it by without ppk/ To set Password Authentication for User



To Adduser on ec2- instance and login it by without ppk / To set  Password Authentication for User :-
Steps:-
          1)        First login to server.
)               2)     Command :-  sudo  adduser  username
          3)       Command for password set :-  sudo  passwd  username

            To set root permission for created user:-

         4)      Sudo   visudo
         5)      Set permission same as root like…

           Under below line
root            ALL=(ALL) ALL
 
      Manohar   ALL= (ALL) ALL
 
6)   Now need to enable PasswordAuthentication 
7)      Edit the file name:- vi /etc/ssh/ssh_config
8)      Uncomment the PasswordAuthentication and set PasswordAuthentication=yes
9)      After setting the password authentication reload the sshd service or restart the ssh service. 
10)   Sudo  /etc/init.d/sshd reload
 
11)  Please verify it by using login to ec2-instance through username and password. 
 
 

Friday 12 April 2013

Sendmail error m4:/etc/mail/sendmail.mc:10: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

To Resolve m4:/etc/mail/sendmail.mc:10: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

If  you getting following error message then.......

 [root@localhost html]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
m4:/etc/mail/sendmail.mc:10: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory


Just fire only one command........
[root@localhost ~]# yum install sendmail* -y


It will show the file name :-

====================================================================================================
 Package                      Arch                Version                   Repository         Size
====================================================================================================
Installing:
 sendmail-cf                  noarch              8.14.4-8.el6              base              184 k
 sendmail-devel               i686                8.14.4-8.el6              base              135 k
 sendmail-doc                 noarch              8.14.4-8.el6              base              533 k
 sendmail-milter              i686                8.14.4-8.el6              base               57 k

Transaction Summary
====================================================================================================


To Verify it by.....
[root@localhost ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf