Re: accidentally changed the owner of sudo
Shawn McMahon <[email protected]>
| Newsgroups | gmane.comp.tools.sudo.user |
|---|---|
| Message-ID | <CAKDhi0TRAZXxCPfBs5P_VdnGyT=CzKevA69PL=na1mjvvg9xkg@mail.gmail.com> |
The "chown" command you typed cannot have changed file permissions, but would (if left uninterrupted) have changed file ownership throughout the system. The error you received suggests file permissions changed, and the "ll" output shows permissions wrong but ownership correct (possibly, depending on distribution). Therefore, more has happened here than you've provided. You'll have to be root to fix the sudo permissions, either by using "su" to become root (requires the root password), logging directly into the system as root (requires the root password), or booting into single user mode. However, depending on how long you let that "chown -R" run, and what other commands you ran that you've left out, it may be the least of your problems. Restoring a backup may be necessary. On Thu, Aug 31, 2017 at 10:46 AM, Tingyu Lu <[email protected]> wrote: > Hello, > I accidentally typed " *sudo chown -R <MyUserName> /*" > when I type "*ls -l*", I got: > > total 80 > drwxrwxr-x 6 heat heat 4096 2017-08-15 16:16 build > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Desktop > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Documents > drwxr-xr-x 3 heat heat 4096 2017-05-18 23:44 Downloads > drwxrwxr-x 3 heat heat 4096 2017-04-21 01:03 espresso > -rw-r--r-- 1 heat heat 179 2017-04-12 15:33 examples.desktop > drwxrwxr-x 2 heat heat 4096 2017-06-07 02:50 jhe17 > drwxrwxr-x 2 heat heat 4096 2017-05-16 11:44 jliu38 > drwxrwxr-x 3 heat heat 4096 2017-05-30 17:26 kkim15 > drwxrwxr-x 5 heat heat 4096 2017-04-21 00:05 lammps > drwxrwxr-x 3 heat heat 4096 2017-08-31 10:50 lammps11-Aug2017 > drwxrwxr-x 3 heat heat 4096 2017-08-28 20:52 lammps_cpu > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Music > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Pictures > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Public > *-rw-rw-r-- 1 heat heat 38 2017-04-25 15:22 sudo* > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Templates > drwxrwxr-x 13 heat heat 4096 2017-08-28 20:40 tlu3 > drwxr-xr-x 2 heat heat 4096 2017-04-12 15:36 Videos > drwxrwxr-x 2 heat heat 4096 2017-04-21 11:49 wzhang42 > > Here, "heat" is my username. > > When I type *"ll /usr/bin/sudo"*, I got* "-rwxr-xr-x 2 root root 168768 > 2013-02-27 15:54 /usr/bin/sudo*"* > > When I type "*sudo*", I got *"sudo: must be setuid root"* > > *Could you please kindly help me with the problem?* > > Thanks, > Tingyu > > -- > Best Regards, > Tingyu Lu > Mechanical and Aerospace Engineering > 911 Oval Dr. - 3404 EBIII > North Carolina State University > Raleigh, NC 27695 > ____________________________________________________________ > sudo-users mailing list <[email protected]> > For list information, options, or to unsubscribe, visit: > https://www.sudo.ws/mailman/listinfo/sudo-users > ____________________________________________________________ sudo-users mailing list <[email protected]> For list information, options, or to unsubscribe, visit: https://www.sudo.ws/mailman/listinfo/sudo-users