Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using wmic to create a process on localhost as a different user

Is there a way to create a process with wmic on localhost as a different user.Using something like this:

wmic  /node:localhost /user:user  process call create "cmd"

I know I can use runas but I'm curious if this is possoble.

May be some of the global switches could help? (/ROLE,/IMPLEVEL,/AUTHLEVEL,/AGGREGATE,/AUTHORITY ) .Or changing some configuration? At the moment I get this error:

ERROR:
Description = User credentials cannot be used for local connections

EDIT: this is the best solution that I've found for such cases

like image 581
npocmaka Avatar asked Mar 05 '26 00:03

npocmaka


1 Answers

The WMI engine doesn't let you use credentials to connect locally so hence WMIC won't either. RunAs is your best bet.

like image 139
stuartd Avatar answered Mar 07 '26 15:03

stuartd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!