I was messing around on my minecraft server with usermod and at some point I copied a command from a forum with incorrect terms.

now when I sudo cat /etc/passwd,

the output for my root user is as follows


with the string in front of the user being my password for the server.

This error has left me being unable to even cd most directories even as im the owner.

As for how the server is setup, im using vultr one click minecraft server

because of this I am still able to access the server through ssh.


1 Answer 1


Since you can do sudo cat /etc/passwd you should also be able to open and edit the passwordfile: ex: sudo nano /etc/passwd and then remove the extra chars before root.

Maybe make a backup of passwd before starting editing it.

  • It seems I have read permission to the file but not write I also tried chmod 777 on the file but i get the error 'Operation not permitted' Commented Mar 10 at 9:12
  • With sudo rights you should be allowed to update / write thefile. Could you please add the output of ls -l /etc/passwd and lsattr /etc/ passwd to your question.
    – Soren A
    Commented Mar 10 at 9:45
  • Maybe also verify that the filesystem is mounted read-write: mount | grep ' / '
    – Soren A
    Commented Mar 10 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .