Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

who is in User group

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
Please, help me.
In my JAVA programm I read files and their permission.
I use (dos ?) command "cacls".

and output is:

'C:\testPerm.txt COMPANY\John:R
COMPANY\Mike OI)(CI)F
COMPANY\READERGRP:R
Everyone:F

I read this output into String variable and process it.
"John" and "Mike" is (single) user, it's no problem. But "READERGRP" is user's group.
I need detect who is in group "READERGRP", but I don't know how do it.

Please, any advice, idea.
My OS is W2K.
Thank You.
 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you will have to stick with 'exec'ing W2K utilities to achieve this.
There is a resource kit utility "showmbrs" that will do what you want. But you will have to parse the output. Also remember that groups may have other groups as members so you may have to write a recursive solution.
Sounds like a painful task.
 
dar
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


There is a resource kit utility "showmbrs" that will do what you want.


Thank You for your reply.
Where can I find some examlple (tutorial, article) about using "showmbrs"?
Thank You.
 
Graeme Brown
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start with Microsoft Technet and search for "showmbrs", or a simple google search might be just as good.
 
reply
    Bookmark Topic Watch Topic
  • New Topic