Le 23.10.2013 15:29, Mário Barbosa a écrit :
Hi,

On 10/23/2013 01:33 PM, berenger.mo...@neutralite.org wrote:
[...]

Hopefully he'll remember that using super user powers have to be made
with care :)

He will. :)


Is there anything like "rpm -V" on the debian toolset? I'm trying to
avoid "punishing him" (further) with reinstall...

It does not do any control (which is the role of rpm -V if I understood correctly the man), but apt-get --reinstall might help. But if he did the changes on /etc, it won't work, because configuration files won't be
modified ( it removes and installs, not purge and installs ).

I already did something along the lines of...

cd /var/cache/apt/archives
ls -1 *.deb | xargs sudo dpkg -Gi

But this will install everything you installed if you never cleaned that dir... you may find useful this command in the future:
$ aptitude search '~i'

The ~i means all installed packages. The generated list will include all automatically installed packages so it's not perfect for your needs, but I do not remember the exact syntax to exclude them. Aptitude's manual should help here.

(after manually fixing ownerships on sudo binaries, working dir's,
and config/data files)

... which apparently solves some of the problems, but is far from
fixing everything (ownerships of /etc and /var being just two
examples).

I think you might have solutions, but what has been changed, exactly? Software binaries in /usr? Configuration files in /etc? Other stuff in
/var?

Upon further investigation, here's what was done:

sudo chown -R <someuser>:<somegroup> /

wow... he really did that on /. You could add to the lesson to never use recursive changes on root directory I guess...

Maybe simply changing back the perms and ownerships might be simpler, too.

Thought about it, but I have no reference to mimic (meaning: I have
no definite list of previous user and group ownerships to
refer/compare to).


Guess I'll bite the bullet and reinstall the machine (with the added
advantage of solving other - unrelated - problems).

You could try to not reinstall the whole system with installer, but simply use aptitude (with the ncurse interface) to purge (and not remove, so that configuration files are removed and reinstalled) all packages. Then, installing them back, if you know what you need. Given that you still have the files in /var/cache/apt/archives it should not involve any downloading, and you will skip the installer's questions. Between the purge and reinstalling, you could probably change back every ownership and perms to root in / (except /home of course) and remove users and groups which could have been installed by packages.

It is simply a solution which might be faster than reinstalling. Or not, it depends on what you have installed so far.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/b6c307dee7091fe054504fad170dd...@neutralite.org

Reply via email to