Shell Script output U

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
FrankGNL
Posts: 3
Joined: Fri May 31, 2013 2:05 am

Shell Script output U

Post by FrankGNL »

Hi All

I have the following problem, i created a script to use winexe, from the command line its working

Code: Select all

winexe -U administrator --password=******** //ipaddress "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe c:\MegaCLI\Temp.Disk1.ps1"
Output: 35

If i put this command in a shell script like this:

Code: Select all

#/bin/bash
winexe -U administrator --password=******** //ipaddress "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe c:\MegaCLI\Temp.Disk1.ps1"
Its working. Output: 35

But if i run this from cacti pollertype cmd.php then the output is U.

I looked at this forum and on google, the only results i got back was the using of special characters, so i removed them. And file permission, i changed that to the cacti user/group.

I hope somebody can help
Thanks in Advance

Regards
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Shell Script output U

Post by paulgevers »

Make sure that the script also works with the environment of the poller user.
I.e. maybe winexe is not found with the $PATH of that user.
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
FrankGNL
Posts: 3
Joined: Fri May 31, 2013 2:05 am

Re: Shell Script output U

Post by FrankGNL »

I tried to run the script as the cacti user and it was working, so winexe is working on the cacti user
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest