[3639] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: chown as root

daemon@ATHENA.MIT.EDU (Mike Sangrey)
Sat Nov 9 20:11:26 1996

To: redhat-list@redhat.com
CC: Jason Benderly <jbenderl@painewebber.com>
In-reply-to: Your message of "Thu, 07 Nov 1996 22:18:52 EST."
             <Pine.LNX.3.95.961107221821.25427C-100000@helix.cs.cuc.edu> 
Date: Sat, 09 Nov 1996 20:07:29 -0500
From: Mike Sangrey <mike@sojurn.lns.pa.us>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Elliot Lee wrote:
> On 8 Nov 1996, Eric Smith wrote:
> 
> > Vlad Petersen <vladimip@iceonline.com> wrote:
> > The real solution to the original problem (acidentally changing the
> > ownership of *everything*) is to somehow extract the original ownership
> > information from the RPM database, and process it with a script that sets
> > the ownership.  However, I can't find an rpm query option that gives the
> > ownership.  "rpm -qal" only gives the file paths; if there was only some way
> > to coax it to give more detailed info...
> 
> rpm -qlav
> 
Aaahhhhhh.

Try
	rpm -qlav \
	| awk '{printf "chown %s.%s %s\n", $2, $3, $8}' \
	| egrep -v 'root.root|0.0'

first.  This will give a list of "hmmmmm...that's a little different than I 
want.  With that list in hand, do

rpm -qlav | awk '{printf "chown %s.%s %s\n", $2, $3, $8}' > /tmp/fixem

then edit 'fixem' to your liking, and run it.

-- 
  Mike Sangrey	<mike@sojurn.lns.pa.us>	(Home)
		<Mike.Sangrey@specmarkmet.com>(Work)
	"I've trademarked `William Della Croce, Jr.(tm)'.
		  Anyone using this name owes me $1,000,000."



--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post