[K12OSN] Re: Help! Please!

Les Mikesell les at futuresource.com
Thu Dec 16 02:23:21 UTC 2004

On Wed, 2004-12-15 at 20:05, Ascension Tech wrote:
> Ok, I'm assuming I messed that md1 up for good.  I'm a jackass. Moving
> on....With knoppix, I read-only mounted one of the raid 1 partitions
> of /home and did "cp -r -p " to a usb2 drive.  But I noticed that all
> of the owners and groups were "unknown".  It would be great if I could
> run a chown script to recursively make the owner of the folders the
> same as the name of the folder.   Does anybody know how that script
> would go?

The reason the users are unknown is that knoppix doesn't have access
to the /etc/passwd file to map the uid numbers back to the matching
names.  The cp -p should keep the original uid values though, so
if you create the same users in the same order they will end up right.

If you need to change them, something like this should work:
cd /home
for name in *
chown -R $name $name

  Les Mikesell
   les at futuresource.com

More information about the K12OSN mailing list