Change default password of root user on aws ubuntu ec2 instance
I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
Search for a command to run...
I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
No comments yet. Be the first to comment.
Create a .htaccess in the root of the directory and append this line anywhere in the file. AddHandler application/x-httpd-alt-php74___lsphp .php Here 74 represents PHP version 7.4. If we want 8.1, it would be 81.
We are going to create a local domain like app.local, Create a self-signed wildcard certificate which will works for subdomains as well and point the domain to a locally running site. Generate a self signed certificate https://www.brainbytez.nl/tutor...
GIT_COMMITTER_DATE="Sun Jul 16 14:00 2023 +0545" git commit --amend --date="Sun Jul 16 14:00 2023 +0545"
mkdir output && for file in *.heic; do heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}"; done mkdir -p output && for file in *; do [[ $file == *.heic ]] && heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}" || cp "$file" output/; done
https://dev.to/cloudx/how-to-use-puppeteer-inside-a-docker-container-568c Dockerfile FROM node:slim # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true # Install Google Chrome Stable and fonts # Note: this installs the...
First ssh into your server using the ssh key.
ssh -i "Mysecretkey.pem" ubuntu@ec2-ip.compute-1.amazonaws.com
Once you are logged in, switch to root user with the following command
sudo su
If successful, you will be switched to root.
Optional:
If you want to enable the root level login, then run this one liner command to enable root login
sed -i -e 's/.*exit 142" \(.*$\)/\1/' /root/.ssh/authorized_keys
Then run passwd root
It will ask for the new password
New password: // Enter new password here
Retype new password: // Re-Enter new password here
Once everything is correct, you will get the success message
passwd: password updated successfully
Congratulations, you have successfully changed your root password.
Also, to change the password of the specific user, you can repeat the same procedure, just provide the different username with the switch user (su) command.
That's it !