Hi, Progress, changed the get_user.sh to (the command works from command line on server):
while [[ $1 == * ]]; do wmic -U domain/username%password //$1 "select UserName from Win32_ComputerSystem" exit done The output of running the command in GLPI is: Running GLPI in debug says: *PHP Notice: *Undefined variable: host in /usr/share/glpi/plugins/shellcommands/front/massiveexec.php at line 142 *LoggedUser ->* *PHP Notice: *Undefined variable: host in /usr/share/glpi/plugins/shellcommands/front/massiveexec.php at line 143 polling user from computer... ERROR: dcom_create_object. ERROR: Login to remote object. /bin/get_user.sh Do I need to escape % , / " for the username and password? BR, Chris On Thursday, November 17, 2011, Christian Långfors wrote: > Hi, > > I was trying to make a Shell Command to poll current logged in user: > > The command looks as follows: ( is located in /bin/get_user.sh ) > > wmic -U domain/username%password //$IP "select UserName from > Win32_ComputerSystem" > > My problem is that the IP gets injected at the "wrong place", it seems > that the [IP] is injected at the end like this: > > wmic -U domain/username%password //$IP "select UserName from > Win32_ComputerSystem" [IP] > > But I need the [IP] to get injected here: > > wmic -U domain/username%password //[IP] "select UserName from > Win32_ComputerSystem" > > wmic is working from the shell ( I have wmi-client installed in Linux ). > > I have GLPI 0.80.5 and the plugin is 1.4.0. > > BR, > Chris >
_______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev