Get/Reset root password on a Linux EC2 instance

0

I am user accessing AWS through Okta SSO. I created a Linux EC2 instance and am accessing it using SSH with a key-pair. sudo helps most of the time but for one specific task I need root password but I don't have it (never had). Is there a way to get it or reset it?

1 回答
1
已接受的回答

"sudo passwd root" should work.

profile pictureAWS
已回答 2 年前
profile picture
专家
已审核 1 个月前
  • I have the same or similar problem. Not on my instance:

    [cloudshell-user@ip-10-6-67-43 ~]$ sudo passwd root sudo: passwd: command not found

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则