Score:0

DELETE default ubuntu user

in flag

I am new to this. Should I delete user ubuntu and Create new one. As everyone knows the username and they can try to login. What's say?

This a ec2 of AWS

in flag
Is this for an Ubuntu Server instance on Amazon EC2? Generally, you specify your own account names on self-installed systems
Pilot6 avatar
cn flag
What is the Ubuntu version. The official distro doesn't have `ubuntu` user.
David avatar
cn flag
There is no user called @ubuntu@ That is the name of the OS. The default user is the one you created during the install.
Om Naidu avatar
in flag
Thats a ec2 of AWS
James S. avatar
de flag
On EC2, the default user is indeed called 'ubuntu'. You can delete that user if you would like, but only after creating another and confirming that you can log in. More importantly, however, you absolutely must tune your SecurityGroup for this instance to restrict ssh connections to only work from known "safe" IP addresses. This is outside of the scope of AskUbuntu, and you are likely to find good help on how to do this on https://serverfault.com/
cn flag
@JamesS. I believe it is "The default user name is determined by the AMI that was specified when you launched the instance."
James S. avatar
de flag
Yes. In the case of Ubuntu AMIs, that username is 'ubuntu'
Score:3
in flag

As this is an EC2 question, the short answer is “No, you do not need to delete the default user”.

There are two primary reasons for this:

  1. Port 22 should be limited via the security policy that the EC2 instance(s) are using. If SSH is open to 0.0.0.0 then something needs to be changed. Immediately.
  2. Even if people know the account name, they will need the .pem private key file that you have associated with the instance(s).

You certainly can change or remove accounts from EC2 instances, but you shouldn’t need to.

James S. avatar
de flag
Point #1 is the really important one. SecurityGroup settings on EC2 are not hard to understand, but they are definitely different from what someone might expect if they are used to administering systems outside of EC2.
CaffeineAddiction avatar
iq flag
Is there any reason NOT to delete the ubuntu user though?
in flag
@CaffeineAddiction there are no reasons to keep the initial account if you really want it gone. Just be sure to create a new account that has `sudo` permissions beforehand if you wish to administer the VM
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.