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: Global delete of obsolete account



On Mon, 21 Mar 2005, Dan O'Donnell wrote:

> Is there a way in ARD 2 to tell it to look for this account in all 
> machines and delete the account on all, all at once?
 
Would disabling the account be enough?

Here's a really silly way to do that. (Several steps here could be 
skipped or shortened, but my OSX Unix books are at home so I'm making 
this up as I go along):

 * find out the user id that you want to remove
   $ INACTIVE=gkaplan
   $ nidump passwd . | grep $INACTIVE | sed 's#:# #g' | awk '{print $3}'
   742
   $ IN_UID=`nidump passwd . | grep $INACTIVE | sed 's#:# #g' | awk '{print $3}'`

 * set that uid to have '*' as the password
   $ niutil -createprop . /users/uid=$IN_UID passwd '*'

The last command will disable, but not delete, the account.

You may have to run it as an admin using `sudo` priviliges:

   $ sudo niutil -createprop . /users/uid=$IN_UID passwd '*'

A bit of tinkering and you can automate this as a script that will run 
on all machines. Look up the man pages, search Google for "niutil", or 
get a copy of _Mac OS X Panther for Unix Geeks_: 

   <http://www.oreilly.com/catalog/mpantherunix/>



-- 
Chris Devers
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Remote-desktop mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/remote-desktop/email@hidden

This email sent to email@hidden

References: 
 >Global delete of obsolete account (From: "Dan O'Donnell" <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.