How to change the default user name from ubuntu to something else on EC2 AMI
How can I create a new Ubuntu AMI so that when a new instance is created the SSH credentials are copied under a different user than ubuntu
(e.g. /home/administrator/.ssh/
)?
In short, I need to be able to use username administrator
instead of ubuntu
.
ssh amazon-ec2 user-management
bumped to the homepage by Community♦ 10 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
How can I create a new Ubuntu AMI so that when a new instance is created the SSH credentials are copied under a different user than ubuntu
(e.g. /home/administrator/.ssh/
)?
In short, I need to be able to use username administrator
instead of ubuntu
.
ssh amazon-ec2 user-management
bumped to the homepage by Community♦ 10 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
How can I create a new Ubuntu AMI so that when a new instance is created the SSH credentials are copied under a different user than ubuntu
(e.g. /home/administrator/.ssh/
)?
In short, I need to be able to use username administrator
instead of ubuntu
.
ssh amazon-ec2 user-management
How can I create a new Ubuntu AMI so that when a new instance is created the SSH credentials are copied under a different user than ubuntu
(e.g. /home/administrator/.ssh/
)?
In short, I need to be able to use username administrator
instead of ubuntu
.
ssh amazon-ec2 user-management
ssh amazon-ec2 user-management
edited Apr 22 '14 at 14:19
Braiam
52.1k20136222
52.1k20136222
asked Feb 27 '13 at 7:00
ubunutec2ubunutec2
111
111
bumped to the homepage by Community♦ 10 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 10 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
I Believe this will work for you:
usermod -l new_name old_name
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
typesu new_name
and enter the chosen password
– fromnaboo
Feb 27 '13 at 8:25
add a comment |
Launch an instance with the 'ubuntu' username, change the user name as indicated by Nathan Cazell then create a new AMI from that instance and launch that.
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
add a comment |
You can use the EC2 user data to do so. Simply launch an AWS instance and place the following in the user data field:
#cloud-config
system_info:
default_user:
name: my_user_name
I wrote a detailed article on this process and it is available at https://emagalha.es/blog/2018/01/21/customizing-the-default-user-of-an-ubuntu-ami/
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f261824%2fhow-to-change-the-default-user-name-from-ubuntu-to-something-else-on-ec2-ami%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I Believe this will work for you:
usermod -l new_name old_name
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
typesu new_name
and enter the chosen password
– fromnaboo
Feb 27 '13 at 8:25
add a comment |
I Believe this will work for you:
usermod -l new_name old_name
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
typesu new_name
and enter the chosen password
– fromnaboo
Feb 27 '13 at 8:25
add a comment |
I Believe this will work for you:
usermod -l new_name old_name
I Believe this will work for you:
usermod -l new_name old_name
answered Feb 27 '13 at 7:22
NtcNtc
4312610
4312610
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
typesu new_name
and enter the chosen password
– fromnaboo
Feb 27 '13 at 8:25
add a comment |
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
typesu new_name
and enter the chosen password
– fromnaboo
Feb 27 '13 at 8:25
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
I need to have a new instance launched with this new user instead of ubuntu.
– ubunutec2
Feb 27 '13 at 7:26
type
su new_name
and enter the chosen password– fromnaboo
Feb 27 '13 at 8:25
type
su new_name
and enter the chosen password– fromnaboo
Feb 27 '13 at 8:25
add a comment |
Launch an instance with the 'ubuntu' username, change the user name as indicated by Nathan Cazell then create a new AMI from that instance and launch that.
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
add a comment |
Launch an instance with the 'ubuntu' username, change the user name as indicated by Nathan Cazell then create a new AMI from that instance and launch that.
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
add a comment |
Launch an instance with the 'ubuntu' username, change the user name as indicated by Nathan Cazell then create a new AMI from that instance and launch that.
Launch an instance with the 'ubuntu' username, change the user name as indicated by Nathan Cazell then create a new AMI from that instance and launch that.
answered Feb 27 '13 at 8:03
Clive van HiltenClive van Hilten
1,268812
1,268812
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
add a comment |
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
2
2
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
I figured it out - you would have to set the user attribute to the username you want in the /etc/cloud/cloud.cfg file.
– ubunutec2
Feb 27 '13 at 8:19
add a comment |
You can use the EC2 user data to do so. Simply launch an AWS instance and place the following in the user data field:
#cloud-config
system_info:
default_user:
name: my_user_name
I wrote a detailed article on this process and it is available at https://emagalha.es/blog/2018/01/21/customizing-the-default-user-of-an-ubuntu-ami/
add a comment |
You can use the EC2 user data to do so. Simply launch an AWS instance and place the following in the user data field:
#cloud-config
system_info:
default_user:
name: my_user_name
I wrote a detailed article on this process and it is available at https://emagalha.es/blog/2018/01/21/customizing-the-default-user-of-an-ubuntu-ami/
add a comment |
You can use the EC2 user data to do so. Simply launch an AWS instance and place the following in the user data field:
#cloud-config
system_info:
default_user:
name: my_user_name
I wrote a detailed article on this process and it is available at https://emagalha.es/blog/2018/01/21/customizing-the-default-user-of-an-ubuntu-ami/
You can use the EC2 user data to do so. Simply launch an AWS instance and place the following in the user data field:
#cloud-config
system_info:
default_user:
name: my_user_name
I wrote a detailed article on this process and it is available at https://emagalha.es/blog/2018/01/21/customizing-the-default-user-of-an-ubuntu-ami/
answered Mar 13 '18 at 18:30
Eric MagalhãesEric Magalhães
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f261824%2fhow-to-change-the-default-user-name-from-ubuntu-to-something-else-on-ec2-ami%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown