I have an Ubuntu EC2 instance that I SSH in via ssh keypairs.
When I try to restart systemd it prompts for a password, which I don't have. I don't believe I set one up, and I have no idea what it would be, since I'm using the keypair to connect as the ubuntu user:
ubuntu@ip-172-31-35-37:~$ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to execute operation: Access denied
How can I make this work?
You need root permission to do that. Use
This may not be the answer, but it certainly is an answer because it worked for me in the same situation:
Execute the following command to elevate yourself to super user for the session:
Info about
sudo su
(aka super user) hereJust run
To get your password!