# Can't login as root

**URL:** <https://forums.suse.com/t/cant-login-as-root/26199>\
**Category:** Amazon-EC2\
**Created:** [October 10, 2014, 4:46am UTC](https://forums.suse.com/t/cant-login-as-root/26199 "2014-10-10T04:46:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IC\_Admin](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@IC\_Admin](https://forums.suse.com/u/IC_Admin)\
**Post date:** [October 10, 2014, 4:46am UTC](https://forums.suse.com/t/cant-login-as-root/26199/1 "2014-10-10T04:46:59Z")

</div>

After upgrading infrastructure, as described in the blog, default login account has changed to ec2-user.  
To administer the instance, I need to login as root but I can’t because I’m asked root’s password when trying to “su”, “sudo”, or “passwd”. Before upgrade, I only accessed with SSH key and hadn’t set password for root.  
How can I get root password? or Is there other way to login as root?

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [October 10, 2014, 5:50am UTC](https://forums.suse.com/t/cant-login-as-root/26199/2 "2014-10-10T05:50:05Z")

</div>

This is an option:

[https://aws.amazon.com/articles/5213606968661598](https://aws.amazon.com/articles/5213606968661598)

Unfortunately AWS will not, as far as I can find anyway (I’ve looked), let  
you modify the root user’s authorized\_keys file unless you SSH in and do  
it yourself. Instead the option above lets you build a new box, attach  
the old system’s disk to it, and then you can hack in your key and then  
move the old disk back to the old system and fire it up. Not hard, just  
take fifteen minutes or so.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![rjschwei](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/rjschwei/32/8937_2.png) [@rjschwei](https://forums.suse.com/u/rjschwei)\
**Post date:** [October 10, 2014, 4:19pm UTC](https://forums.suse.com/t/cant-login-as-root/26199/3 "2014-10-10T16:19:47Z")

</div>

sudo -i should work, I am pretty certain that was tested.
