Erik Torres Serrano
2005-Apr-07 18:07 UTC
[Samba] Listing all users in a remote Samba server
Hi, I'm trying to develop a service for retrieving the entire user list of a remote samba server. The expected result is the same expected from the use of the samba command: net rpc user The service is coupled with one only request: should be written using Perl language. I have search at the internet and I have read a lot of documentation but I have no idea on how should I do it. Any clue or comment will be welcome. Best regards, Erik
On Thu, Apr 07, 2005 at 02:10:09PM -0400, Erik Torres Serrano wrote:> Hi, > > I'm trying to develop a service for retrieving the entire user list of a > remote samba server. The expected result is the same expected from the > use of the samba command: > > net rpc user > > The service is coupled with one only request: should be written using > Perl language. I have search at the internet and I have read a lot of > documentation but I have no idea on how should I do it. Any clue or > comment will be welcome. > > Best regards, > > ErikIf the passdb is in LDAP you could query the directory directly via Net::LDAP. -- Steve Feehan
> I'm trying to develop a service for retrieving the entire user list of > a remote samba server. The expected result is the same expected from > the use of the samba command: > > net rpc user >Depending on your backend, there's several ways to go about it, including querying LDAP for the entries with an appropriate filter and parsing the smbpasswd file. I believe you could also get some info out of pdbedit, but that could be a bit tedious. What is your backend?> The service is coupled with one only request: should be written using > Perl language. I have search at the internet and I have read a lot of > documentation but I have no idea on how should I do it. Any clue or > comment will be welcome. > > Best regards, > > Erik >-- Paul Gienger Office: 701-281-1884 Applied Engineering Inc. Systems Architect Fax: 701-281-1322 URL: www.ae-solutions.com mailto: pgienger@ae-solutions.com