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.
Am 24.08.21 um 17:36 schrieb Dave Houser via samba:> 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.have you checked if rpcclient supports feeding commands via stdin? Eg smbclient does support this, no idea if we support it in rpcclient as well. -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team https://www.sernet.de/en/team-samba Samba Development and Support, SerNet Professional Services -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20210824/105e73cd/OpenPGP_signature.sig>
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. > > >