Thread-topic: Bulk Deleting of User Accounts and Files
User-agent: Microsoft-Entourage/11.2.4.060510
On 8/7/06 7:41 PM, "Dan Shoop" <email@hidden> wrote:
> At 12:07 PM -0400 8/7/06, Adam Gerson wrote:
>> We have to delete about 100 users from our directory of around 1000. I need
>> to delete the OD user records as well as the home folders. Given a text file
>> with short names does anyone have a script that could accomplish this task?
>
> Deleting users of a system is generally not recommended.
>
> POSIX permissions are based on UID/GID and a recycled UID or GID can
> lead to security issues. Any user anywhere could have file(s)
> permitting the current UID/GID owners to access files.
>
> Instead consider disabling dead accounts rather than removing the
> account. Then remove *all* files owned by them *everywhere*, not just
> in /their/ HOMEs.
>
I think you make a good point. However, we are a school so every year we
have about 100 students leave and another 100 new users. After time doesn't
this practice of just disabling accounts create a lot of clutter and
unnecessary data?
Using Passenger I can ensure that new accounts are created with unused UIDs.
>> I could even write my own if I knew the command line code for deleting a
>> user account.
>
> Did you read the Command Line docs.
I did, they provide an example using dscl in interactive mode. Can I use
interactive mode from within a script? I am looking for an example I can
execute in a single line inside a loop within a script.
Adam
--
Adam Gerson
Assistant Director of Technology
Apple Certified Technical Coordinator
Columbia Grammar and Prep School
phone. 212-749-6200 ex. 321
mobile. 917-679-0234
fax. 212-428-6806
email@hidden
http://www.cgps.org
Public key - subkeys.pgp.net
_______________________________________________
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