[Samba] rpcclient gather many users quickly

Dave Houser davehouser1 at gmail.com
Mon Aug 30 19:03:30 UTC 2021

Just wanted to check, anyone have any ideas? Just looking for confirmation
on if you can only specify one user at a time or if you can use multiple
for queryuser option?

On Tue, Aug 24, 2021 at 11:36 AM Dave Houser <davehouser1 at gmail.com> wrote:

> I am using rpcclient with the command queryuser to gather information
> about user password expirations.
> Problem: rpcclient is slow when I have many users to gather (over 100), it
> seems a new tcp connection needs to be established with authentication each
> time rpcclient is run to gather info for all users.
> My syntax is the following:
> rpcclient -U $USER%$PASS -c "queryuser $i" $DC 2> ./rpc_errFile
> $i = a list of users that I have.
> I noticed that there is a different transport option I can use which is
> "ncalrpc" but I don't understand how to use it in my command syntax, can
> someone help with how I should use this?
> More importantly is there a way I can pass a list of users via "queryuser"
> command? or is it only one user at a time? Ideally I would like to send the
> full list of users, have rpcclient authenticate once set up one tcp
> connection and get all information back.

More information about the samba mailing list