From owner-freebsd-questions Fri May 23 06:44:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA20987 for questions-outgoing; Fri, 23 May 1997 06:44:59 -0700 (PDT) Received: from mail.EUnet.hu (www.eunet.hu [193.225.28.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA20981 for ; Fri, 23 May 1997 06:44:56 -0700 (PDT) Received: by mail.EUnet.hu, id PAA10222; Fri, 23 May 1997 15:44:44 +0200 Received: (from zgabor@localhost) by CoDe.hu (8.7.5/8.7.3) id OAA00450; Fri, 23 May 1997 14:37:21 +0200 (MET DST) From: Zahemszky Gabor Message-Id: <199705231237.OAA00450@CoDe.hu> Subject: Re: Problem! To: freebsd-questions@freebsd.org (FreeBSD questions) Date: Fri, 23 May 1997 14:37:21 +0200 (MET DST) Cc: shawn@luke.cpl.net In-Reply-To: from Shawn Ramsey at "May 21, 97 08:13:05 pm" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > We have a slight problem. Accidentaly, the command chown /*/* (or > something like that) was performed as root. :( /dev, amoung others have > the wrong owner. Do all the /dev files have the same owner? Root? Bin? > What? > > What should most executable files have, such as /bin, and /sbin? Do I need > to reinstall, or can I assign all the system executables root w/o mishap? Try mtree(8), with the files in /etc/mtree. Something like mtree -f /etc/mtree/BSD.root.dist -U -p / mtree -f /etc/mtree/BSD.usr.dist -U -p /usr mtree -f /etc/mtree/BSD.var.dist -U -p /var mtree -f /etc/mtree/BSD.local.dist -U -p /usr/local ... Bye, Gabor -- #!/bin/ksh Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"