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 Antwort
1
Akzeptierte Antwort

"sudo passwd root" should work.

profile pictureAWS
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
  • 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

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen