recently I have been facing a serious issue on one of my servers. While accessing my server with solar putty on windows I got error accessing the server message on the response. So I tried from my server console but I couldn't access the server. Later I got access with the AWS systems manager with an ssm-agent new user account. But, I can not start or run any service from that user account. It says to use the sudo command but whenever I try sudo the server gives me the following error.
sh-4.2$ sudo yum install polkit
sudo: /etc/sudo.conf is world writable
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
and on starting any service the server shows me this
sh-4.2$ systemctl start sshd
Failed to start sshd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status sshd.service' for details
What is the issue? I have been trying hard to get the server working. but I am not being able to start the server. Can anyone help me with the issue?
thanks
chown
orchmod
operation on the wrong path. Do you remember? It would be best to reinitialize the server. See also: https://askubuntu.com/questions/43621/what-if-i-accidentally-run-command-chmod-r-on-system-directories-etc or https://unix.stackexchange.com/questions/48845/how-to-revert-chown-command or https://unix.stackexchange.com/questions/587373/cant-login-after-chown-command?noredirect=1&lq=1 – pLumo Mar 13 '21 at 10:30