<br />
Hello<br />
I'm running a script via upssched<br />
<br />
on a onbatt event, I want to sent a email, shutdown a windows server and shutdown an ubuntu server<br />
When I run my script manually, all is ok but via upssched-cmd<br />
it return "exec_cmd returned 255"<br />
<br />
here is the script<br />
#!/bin/bash<br />
# send mail to admin<br />
echo "ECO" | mail -s "ARRET SERVEURS NON PRIORITAIRES" moi@domaine.fr<br />
net rpc shutdown -f -I ip_windows -U login%passwd<br />
ssh login@ip_ubuntu sudo shutdown -h now<br />
<br />
If I run only this cde<br />
net rpc shutdown -f -I ip_windows -U login%passwd<br />
it's ok<br />
<br />
if I run only this cde<br />
ssh login@ip_ubuntu sudo /sbin/shutdown -h now<br />
I have returned 255<br />
<br />
Is someone can help me<br />
Thanks a lot<br />
<br />
<br /><hr style="border:dotted 1px silver; width:90%; border:dotted 1px silver;"><p><strong><br />
</strong><strong>Sabine Goudard</strong><br />
Service Informatique et Multimédia<br />
Tél : 04 77 42 37 20</p>
<p><strong>Ecole Nationale Supérieure  d’Architecture de Saint-Étienne</strong><br />
1, rue Buisson BP 94 <br />
42003 Saint-Étienne Cedex 1<br />
Fax : 04 77 42 35 40<br />
<a href="http://www.st-etienne.archi.fr">http://www.st-etienne.archi.fr</a></p>