On Tue, 12 Sep 2006, Hartmut Meyer wrote:
Hi,
On Monday 11 September 2006 23:37, James D. Parra wrote:
Short story; accidentally created a user with user ID of '0'. Went to change the ID of all the files owned by the user to the proper ID and now all the root user files have the four digit ID.
How can I quickly (real quick) change the four digit ID on the files owned by root back to '0' recursively.
I would recommend using rpm for this:
rpm -qa --setugids
will set all file user/group ownerships back to how it was installed with RPM. This of course will miss out on files that
a) have not been installed through RPM b) have changed ownership by means of a postinstall script
Chances are, you will be able to catch b) with SuSEconfig.
You don't need the -q (query). However, it's good advice. I'd follow that up with rpm -a --setperms. Always do --setugids *before* --setperms. Alternatively, you could see what might be wrong with: rpm -Va although that will probably print out stuff like timestamp changed, config file changed, etc... that isn't necessarily what you are looking for. Still, I find it useful to determine what has changed. -- Carpe diem - Seize the day. Carp in denim - There's a fish in my pants! Jon Nelson <jnelson-suse@jamponi.net>