[Carbon] how do i get a list of users and groups??

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default [Carbon] how do i get a list of users and groups??

    hey all, i've been struggling to figure out how to get a list of users and
    groups like the finder's get info window displays in its ownership &
    permissions section.

    i'm not too familiar with unix, and i'm using carbon to write this program
    (on os x) and haven't found anything in apple's documentation (big surprise)
    except for the function PBGetUGEntrySync which i can't get to work for the
    life of me (i keep getting -50 errors for every possible variation of the
    parameters).

    if anyone out there knows how to do this (seemingly normal) task, please
    post back.

    thanks in advance,
    logan

    --
    Logan Murray - [email]logan@electricstorm.com[/email]
    AIM: MrCiv ICQ: 29648209

    Logan Murray Guest

  2. Similar Questions and Discussions

    1. Selecting users that are in multiple groups
      I am very new to ColdFusion and am having a light issue trying to select users that are in multiple groups... Basically, I want the sales people...
    2. Users login: Nested groups.
      Hi there! If anyone could help me... thanks! My problem is this: our application controls the users login with Active Directory. It checks that...
    3. adding users to different groups
      Hi group, I need to add a user (myself) to a group he doesn't belong to by default. On most unices I do edit the group file and voila. On the...
    4. local users and groups
      When I try to access the Local Users and Groups, as the local administrator, there's an X, and I get an error message stating, Unable to access the...
    5. DirectoryEntry - enum users/groups...
      Hi, Joe, Thank You for pointing me in the right direction. My apps now captures the user's password with a text box and retrieves the user's...
  3. #2

    Default Re: [Carbon] how do i get a list of users and groups??

    In article <BB8C1D09.DD28%logan@electricstorm.com>,
    Logan Murray <logan@electricstorm.com> wrote:
    > hey all, i've been struggling to figure out how to get a list of users and
    > groups like the finder's get info window displays in its ownership &
    > permissions section.
    >
    > i'm not too familiar with unix, and i'm using carbon to write this program
    > (on os x) and haven't found anything in apple's documentation (big surprise)
    > except for the function PBGetUGEntrySync which i can't get to work for the
    > life of me (i keep getting -50 errors for every possible variation of the
    > parameters).
    getpwent and getgrent.

    hth

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Jurisic Guest

  4. #3

    Default Re: [Carbon] how do i get a list of users and groups??

    In article <macdev-8F44B0.09365816092003@senator-bedfellow.mit.edu>,
    Miro Jurisic <macdev@meeroh.org> wrote:
    > In article <BB8C1D09.DD28%logan@electricstorm.com>,
    > Logan Murray <logan@electricstorm.com> wrote:
    >
    > > hey all, i've been struggling to figure out how to get a list of users and
    > > groups like the finder's get info window displays in its ownership &
    > > permissions section.
    > >
    > > i'm not too familiar with unix, and i'm using carbon to write this program
    > > (on os x) and haven't found anything in apple's documentation (big surprise)
    > > except for the function PBGetUGEntrySync which i can't get to work for the
    > > life of me (i keep getting -50 errors for every possible variation of the
    > > parameters).
    >
    > getpwent and getgrent.
    >
    > hth
    >
    > meeroh
    In the "System" framework. Available to Mach-O programs, or, if you are
    using CFM, you can use:

    CFURLCreateCopyAppendingPathComponent()
    CFBundleCreate()
    CFBundleLoadExecutable()
    CFBundleGetFunctionPointerForName()

    to get a function pointer you can execute out of the System framework.
    (I'll post a sample code fragment if you want.)

    getpwent and getgrent are documented with man pages. In a "Terminal"
    window, say:

    man getpwent


    You can search the man database using

    apropos

    # or

    man -k

    But, you might need to run the command-line command

    makewhatis
    David Phillip Oster Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139