Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic