Something like...

 #!/bin/bash

for user in `dir /var/mail/users` ; do
        echo changing owner for user: $user
        chown -R $user. /var/mail/users/$user
Done


Chris Smith


-----Original Message-----
From: tclug-list-bounces at mn-linux.org
[mailto:tclug-list-bounces at mn-linux.org] On Behalf Of justin at jv.dyns.cx
Sent: Wednesday, May 18, 2005 10:23 PM
To: tclug-list at mn-linux.org
Subject: [tclug-list] /var/mail and /var/spool/mail script

Could someone please help me out and let me know a script or two that will
change all files eg. /var/mail/user.file so the owner and group are the same
as the file name.  Hope this is enough info. Thanks

JV

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota tclug-list at mn-linux.org
http://mailman.mn-linux.org/mailman/listinfo/tclug-list