• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List of accounts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of accounts


  • Subject: Re: List of accounts
  • From: Juan Manuel Palacios <email@hidden>
  • Date: Mon, 10 Aug 2009 14:44:13 -0430


On Aug 10, 2009, at 1:46 PM, Tim Murison wrote:

Hi,

I'm trying to determine how to get a list of BSD user ids that can login to
the machine, either with a GUI or via ssh.


My current approach is to build something like the 'dscacheutil -q user'
command filtering on users who have a valid shell. I'm thinking that a valid
shell would be determined by looking in the /etc/shells file.


Is there a better way of doing this?

-Tim


I wrote a small script a while ago:

http://trac.macports.org/browser/users/jmpp/showids.sh

It currently seems to have some output formatting issues on Leopard when you call it with the -v verbose flag (perhaps dscl's output changed a bit from Tiger's), but other than that it comes in handy when you want to see which uid's and gid's are taken on your system. Further parsing and/or deeper inspection of the Directory Services info might get your the exact information you need. Feel free to use & hack at will.

	Regards,...


-jmpp


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: List of accounts
      • From: Geoff Lee <email@hidden>
References: 
 >List of accounts (From: Tim Murison <email@hidden>)

  • Prev by Date: List of accounts
  • Next by Date: Open Source Release for Mac OS X 10.5.8
  • Previous by thread: List of accounts
  • Next by thread: Re: List of accounts
  • Index(es):
    • Date
    • Thread