It's my first time trying to setup a web server.

I was trying to set up a Digital Ocean Droplet running CentOS.

During nginx setup, I 'accidentally' changed the permission of '/' to the nginx user, so now I can't access anything; sudo fails with:

sudo: /etc/sudo.conf is owned by uid 997, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Unfortunately, by following Digital Ocean's guides, I disabled root login, so I can't find a way to change the permissions back. I've tried to

su - nginx

but I couldn't find the password of that user, so that won't help.

Is there a known default password when nginx initializes, or perhaps another solution? Must I shut my server down, and get a new one?

  • Did you disable root login completely or only over SSH? If you still have regular root login enabled, you can use Digital Ocean's web console. – Worthwelle Sep 6 at 21:03
  • You're right, I disabled it only over SSH. However after I reset my root pwd, and tried to set a new one over the web console, i got authentication token manipulation error multiple times. It seems to be an unsolved problem, so again, i guess I'm out of options. – Márton Pitó Sep 6 at 21:27

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.