Change root password of instance in Amazon EC 2 & Webmin - amazon-ec2

I have set up a website with the help of a System Admin on Amazon EC2. After the work, he installed a Webmin for me to handle the things like Control Panel. Now I need to reset the password for everything to keep things secure. For this:
(a) I have changed all users password including root user from Webmin interface
(b) Change the password associated with EC2 account.
But do it need to change the password of the EC 2 instance? Or it is already changed when I edited the password of the root user from Webmin ?

No, the password of the instances are unrelated to those of the amazon passwords. You'd be better of using key pairs than passwords for this reason.

The answer given by #HirenSagar is correct.
You cannot access your webmin instance without a password.
EC2 instances dont have passwords by default.
But you can side-step that by manually setting a password and user for your webmin.
First update your apt:
sudo apt-get update
Then:
sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
Root is the webmin user and password is its password.

I think you should change the password of your instance it will protect your data from the hacker. Please set a strong password for your instance. A password should be a combination of uppercase letter (A,B,C,D), lowercase letter (a,b,c,d), numbers (1,2,3,4) and special character (#,#,&). A weak password is easily hacked by the hacker.
You can change the password of your instance by login into your AWS control panel:
Step 1: Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Step 2: In the navigation pane, choose Instances and then choose the instance that needs a password reset. ...
Step 3: Choose Actions, Instance Settings, Get System Log.
Step 4: Locate the EC2 Agent entry, for example, EC2 Agent: Ec2Config service v3.18.1118.

hi u could not change password of EC2, It has a Keypair, (.pem file to convert .ppk file through putty key generator) when u created EC2 instance From Aws,
make sure you have to give SSH Assess to your ip Address From Security Group (AWS-EC2-Inbound rules) then you can SSH from putty and manage Ubuntu terminal
User name Ubuntu, pass if created that or upload ppk for open terminal,
after login,
if u wann reset or change pass of webmin
you should try this
1 sudo apt-get update
2 sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpass;
3 sudo /etc/init.d/webmin restart

Related

Add user to login to an AWS EC2 instance

Im a newb to AWS, so please go easy on me. We currently just spun up a custom Windows 10 instance in AWS. I was able to login via RDP successfully, but I'd like to create a new user within the instance so they can login with a different user account using RDP. Any thoughts would be much appreciated.
Okay, After your response to my first, I think I see what you are asking. Plase watch this video:
https://www.youtube.com/watch?v=rgk2w3dQGSo
Download the RDP. Save it. You can then Edit the .rdp and enter the user name and password you created in Windows.
You can create users in the User Management Console in Windows. Ensure they have the rights needed (Remote Desktop User, Administrator, etc).
Enjoy!
Once an Amazon EC2 Windows instance has been launched, it is just a normal Windows computer.
Therefore, you should use use the standard Admin tools to create the user on the Windows computer, with their own username and password.
It is also recommended that you change the random Administrator password after initial login, or (even better) connect the instance to Active Directory or whatever standard authentication system your company uses.
Technoob here. I just figured out why all of you are having trouble. You need to go to the security group the machine is a part of and open port 3389 to your public IP address (ipchicken.com works). Enjoy
If you are trying to connect from another computer then you have to change the inbound rules.
Go to the security groups of your instance. Go to the inbound rules. Add ipv4 and ipv6 as a new rule and apply it. Download the RDP File and try to connect again. It worked for me.

Can I SSH with a UID instead of a username?

So, I'm working with a software product that deploys as an OVA. They don't generate new SSH keys upon install, so every VM deployment has the same keys. And they allow key based login.
The admin user's uid is always 4001. The admin username is decided at the time the OVA is deployed.
Is there a way to connect via SSH specifying a UID on the remote system instead of a username? :)

How to replace/add key pair for a Windows EC2 instance

I have a running Windows server image on EC2.
I created an additional administrator login and have been using it login using RDP. Unfortunately I've lost the PEM file for the "Administrator" account and I've also disabled it for "safety"
Since I have access to the instance through an alternative administrative account I'm trying to figure out a few things:
Do need the "Administator" account PEM file in future?
If I get Amazon to generate a new PEM file using the same name that I currently have, how do I replace the "Administrator" key pair for the instance?
I've searched all over and can't find an answer on how to replace the key pair or add an additional key pair to a running "Windows" instance
Everything talks about shutting down and creating an new instance. I cannot shut down this server, so that must be a way to replace the key pair for the "Administrator" account.
I can't even find where Windows stores the key pair in a Windows server.
When an instance is first launched from one of the Amazon-supplied Windows AMIs, some code on the instance generates a random Administrator password. This password is then encrypted with the selected Keypair and passed back to AWS (you can actually see it in the System Log).
When you wish to first login to the instance, you will need to use the PEM to decrypt the Administrator password. You can then login to the Windows instance using that password.
It is recommended that you immediately change the Administrator password or connect the instance to Active Directory -- basically, follow your standard company security practices.
If you remember the password, you will not require the PEM file again. In fact, if you change the password, then even having the PEM will not facilitate access because it will only decrypt the original password, not the current password.
Bottom line: Ignore the PEM file. You still have administrative access to the instance, so you don't even need the Administrator account anymore. If you wish to use the Administrator account, simply use your existing administrative login to reactive it and set the password. There is no reason to panic and, actually, no reason to do anything.

Is it possible to create from scratch a vagrant box with a custom password?

There are many tutorials that say that it is possible to create a vagrant box from scratch by using a Ubuntu iso and Virtualbox, however, always they use as a username vagrant and password vagrant by default. Is it possible to use another password? When the basic credential vagrant-vagrant is used, this is hidden (or it's not necessary to write it) in Vagrantfile. Would it happen the same with another password by default?
You decide which username/password that you will use.
For example there are packer templates available in github, most of them will create the vagrant user (such as https://github.com/boxcutter/ubuntu/blob/master/script/vagrant.sh) - you can easily change it to your own username.
As for password, you can set it from the script as well, but its more convenient to use the ssh key to login. If you wish to login with a password, you'll set the password from Vagrantfile (config.ssh.password)

How can I ssh without a password

My os is OS X 10.8.5. I want to ssh to localhost, but I always get prompted for a password.I don't know the password.
How do I reset the ssh config in mac osx? I removed .ssh folder.
ssh does not work without a password, it would compromise your system too much.
You may setup an easy password for youself and use the command "sudo ssh username#127.0.0.1" then you will be prompted for the password you usualy are using.
You also may enable the root account and use this account. But be carefull, you can mess up you system pretty much when you are logged in as a root user.
Enable root user via path "Your hard disk"/System/Library/CoreServices. There you find al lot of handy programs for system management. You be looking for the "Directory utility" App.
After starting this App unlock the lock (left below) and fill in your system password.
Then via the menu at the top you can unlock the root user, via (Edit/Enable root user). Choose then a password. If you fill in no password then the root user will not be enabled, i think.
Hope this will help you.

Resources