Hello I'm running a script via upssched on a onbatt event, I want to sent a email, shutdown a windows server and shutdown an ubuntu server When I run my script manually, all is ok but via upssched-cmd it return "exec_cmd returned 255" here is the script #!/bin/bash # send mail to admin echo "ECO" | mail -s "ARRET SERVEURS NON PRIORITAIRES" moi at domaine.fr net rpc shutdown -f -I ip_windows -U login%passwd ssh login at ip_ubuntu sudo shutdown -h now If I run only this cde net rpc shutdown -f -I ip_windows -U login%passwd it's ok if I run only this cde ssh login at ip_ubuntu sudo /sbin/shutdown -h now I have returned 255 Is someone can help me Thanks a lot -- Sabine Goudard Service Informatique et Multim?dia T?l : 04 77 42 37 20 Ecole Nationale Sup?rieure d?Architecture de Saint-?tienne 1, rue Buisson BP 94 42003 Saint-?tienne Cedex 1 Fax : 04 77 42 35 40 [http://www.st-etienne.archi.fr -> http://www.st-etienne.archi.fr] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20130418/6c609ff1/attachment.html>