[Samba] Q: how to collect user/group-names

Chris Osicki osk at admin.swisscom-mobile.ch
Mon Sep 24 19:45:08 GMT 2007

> On 9/24/07, Chris Osicki <osk at admin.swisscom-mobile.ch> wrote:
> > Hi
> >
> > Sorry if it's not 100% appropriate for this list, cannot think of better
> > place to find people with lots of know-how from Unix and Windows.
> > I'm currently working on replacing EMC's Celerra file servers by Linux/Samba.
> > The SID to UID/GID mapping table on Celerra is very large, ~50'000 entries
> > and I don't want to pollute my LDAP server with all this (using winbind with
> > LDAP back-end). Most of those entries are there for historical reasons and are
> > just useless.
> > Now my question: does anybody know a tool working under Windows to scan a
> > filesystem and collect all usernames/groupnames (or SIDS) used?
> > Any Samba's tool having this capability?
> >
> > Thanks for your time.
> >
> > Regards,
> > Chris
> Chris,
> Easy. Find is your friend. It can find anything and do whatever with
> the results.
> find /tmp/ -type f -printf "%U \n" | sort | uniq > uids.txt
> find /tmp/ -type f -printf "%G \n" | sort | uniq > gids.txt
> If you know the uid's and gid's + you got the mappings, it's easy to
> know which sid's you (don't) need.
> --
> Frank Van Damme
> A: Because it destroys the flow of the conversation
> Q: Why is it bad?
> A: No, it's bad.
> Q: Should I top post in replies to mails or on usenet?


thanks for your quick answer.
Unfortunately it's not what I'm looking for.
I want to find out what users or groups have been given 
any rights on a file or directory. In other words I want 
to collect user/group-names from ACL's. Or if you want, 
collect those information which you would see when under 
Windows you right click on a file/directory and select 
And I'm looking for a way of do it "automaticaly".
A sort of Windows "getfacl -R".

Thanks for your time.


More information about the samba mailing list