2

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

  • You have issues with wrong permissions. Probably you issued some chown or chmod 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
  • Thank you for the comment, as far as i remember i didnt do any chmod commands. The issue mainly arises when i tried to access the server through solar putty with my windows pc. But unfortunately i just got messed up with everything. – MD Nasirul Islam Mar 13 '21 at 11:04

1 Answers1

0

Well unfortunately to say that the whole instance was corrupted. I had to remove the instance I had no other way. Well, I did try to mount the corrupted partition to somewhere else and tried to set up the firewall but it also didn't help.