Okay, finally I figured out one method.
First of all login to your AWS EC2 using putty, then first of run this command:
su passwd
it will give you option to set new password for user “root” without even asking the current password. By default, the root username on ubuntu is “ubuntu”, not “root” ( and while loggin in to AWS EC2 via Putty , we use “ubuntu” as username) but when you run the command
su paaswd
It sets password for username “root” not , “ubuntu”. why? Ask a developer. I have no idea about it
after setting password
now run:
su root
then it will ask for password- type the password and click “enter” while typing the password, you won’t see anything ( even no asteric mark, so nothing to worry about that, passwords on unix is completly invisible )
now to reload the nginx, simply run following command as given in the tutorial here: https://easyengine.io/tutorials/nginx/letsencrypt/
nginx -t && service nginx reload
Once you logged in as user “root” , now you don’t need to type “sudo” before writing commands.
and that’s it…
