Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Batch Folders



On 2008-07-28 Dave Gray wrote:
> I have a 10.5 server and want to create a single folder for each user  
> from a list of a few hundred users.  Not Homes, that I can do.
> 
> I just want a single folder for each user that is accessible via file  
> sharing.  I have the list of users which I will use to create the  
> user accounts and want to create the folders (in a single directory)  
> automatically with the right permissions in place via a few commands  
> (GUI or terminal).

You mean something like this?

----8<----
#!/bin/bash

$destdir="/SOME/DIR"

while read username; do
  mkdir -p "$destdir/$username"
  chown -R $username:$username "$destdir/$username"
  chmod -R u=rwX,go=rX "$destdir/$username"
done < "/PATH/TO/user.list"
---->8----

Regards
Ansgar Wiechers
-- 
"Another option [for defragmentation] is to back up your important files,
erase the hard disk, then reinstall Mac OS X and your backed up files."
--http://docs.info.apple.com/article.html?artnum=25668
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden

References: 
 >Batch Folders (From: Dave Gray <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.