On Thursday 21 April 2005 10:37, Raymond Norton wrote:
> We managed to rescue all the home folders, and user info files from our
> server that crashed. We have copied them over to a new Fedora core 3
> install. Is there a script I can run that can give the users in
> /etc/passwd full control of their original home folder. As of now, only
> root has permission to access them.

If you preserved the uid and gid information on the home directories, all you 
would have to do is match the new uids with the old ones (assuming they're 
different).  If it isn't preserved, you have to change the owner on every 
home directory.  If it still doesn't work, then there's another problem.

assuming the users are set up, all the directories and files in /home are the 
same name as the owner, and that the correct group to be associated with them 
is 'users', you could type in this script:

for homedir in `ls -1 /home`; do chown -vR $homedir:users /home/$homedir ; 
done

if you want a 'test run' of the logic, put an echo before chown.
-- 
-dave

Dave Carlson <thecubic at thecubic.net>

PGP/GPG Fingerprint:
C3D0 9962 1E98 B742 132D  0E1A CE11 7C4B 5309 97A7
(visit http://www.gnupg.org for more information)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20050421/eb9381a2/attachment.pgp