Well if the system packages are all installed from debian packages, that would be magnificent, but in case the system had some other packages (for example compiling them on the system), these packages perhaps might not work properly, so the user should see what other packages he had installed and try to fix them if he can or reinstall them once again.

Thanks Ziad that was really great.

On 11/30/05, Zaid Amireh <[EMAIL PROTECTED]> wrote:
Well, someone did `chown -R foo:bar /` and the system went berserk,
how can you restore proper ownership on system files?

#dpkg --get-selections | cut -f 1 > packages

then in a file paste the following

#!/bin/bash
exec < "$1"
while read LINE; do
        apt-get install --reinstall --assume-yes $LINE
done

execute the file with the 'packages' file as an argument, it will
reinstall every single package on the system thus restoring the
ownership and the sticky bits too.

hope this helps some as most people suggest a reinstall.

Zaid

--
---------------------------
Netiquette -> http://www.dtcc.edu/cs/rfc1855.html
Netiquette Nazi ->
http://redwing.hutman.net/%7Emreed/warriorshtm/netiquettenazi.htm
---------------------------
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org



--
                                 Ala'a A. Ibrahim
http://360.yahoo.com/bai_83
http://alaa83.blogspot.com/
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org

Reply via email to