Recently, due to some messy stuff with master boot record, I have to re-install my Ubuntu. Before doing that, I back up all folder (exclude root, bin, sbin, tmp, media, mnt) to a NTFS partition. After installation of Ubuntu, I copied back all the folder using a nautilus (running by sudo nautilus). After that, I reboot my computer. And boom, now I cannot run sudo any more, my network services cannot run. When I run sudo from a terminal, I ge "must be setuid root" error. In ubuntu, root account is disabled by default, I don't know why all these files is no longer under ownership of my account. How would I recover back?
sudo command must have setuid permission bit set on it's executable. But in Ubuntu you currently cannot become root. I think you can boot from emergency disk and set this bit on sudo using chmod.
As Fractalizer said, this is an issue with the setuid bit on sudo. A detailed explanation of how to fix it can be found here: http://ubuntuforums.org/showthread.php?t=219767
There's a pretty good chance there will be other issues beyond this program. So you may find other things blowing up once you resolved the specific problem with sudo. Unfortunately, cp'ing to an NFS share isn't going to retain all the permissions you'll need for a fully functioning system. Especially in places like /usr/bin.
your files no longer belong to your account, because you copied them as root. this way root became the owner.
to get back to sudo, mount your root partition from a rescue environment and edit
etc/group. add your user account to the admin group and you should have sudo access again.
after that you can change ownership of the copied files. do you have another ubuntu installation where to look for the correct ownership?
As the others have already said, this is a permissions issue.
First, you copied to a NTFS partition, which has different permissions, so yo are likely to lose some information in the process, although I have never tried it.
Second, you probably should have copied the files with
cp -p to preserve mode and ownership.
The best option is to use
tar (or equivalent) and I guess you mistyped the command with its options. A simple way to do a backup is something like
tar cf /path/to/backup.tar /usr /bin /var
Also, as others have mentioned,
rsync is a valid option.