I moved /etc folder to another place.
Now when i use
sudo mv command it says:
sudo: uid 1010 does not exist in the passwd file
there's a solution for it? it happenned in my vps by ssh. Format isn't an option. (ubuntu VPS)
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
The problem here is that the way users are authenticated for login on Ubuntu is with the
/etc/passwd file. Since that file is missing... bad things are going to happen, such as sudo not working.
If you have root access somewhere, such as a session you still have open, or you can figure out how to get in as root, you can make a
symlink (which is similar to a shortcut on Windows) to the new location so that the operating system can find the file. You do this with the
ln command. The syntax would be:
ln -s [your new /etc location] /etc
Now, for repairing your current system, you can do:
Boot to a Live environment.
Mount your current Ubuntu partition:
sudo mount /dev/sdXY /mnt
Change XY to your current Ubuntu partition. If unsure launch Gparted from live environment and look for something like
/etc back to its place i.e.,
/mnt/etc Copy it with
Now after you have booted to your installed system, you can delete the previously moved
This is what you did by moving
/etc away without an open shell with privileges:
Image from: http://imgur.com/gallery/eEsd4V1
... The only way out is to reset the VPS after a backup. Sorry. Remember, with
sudo come great power and great responsibility...