This is confirmed when submitting with -b y:

sudo: sorry, you must have a tty to run sudo

Regards,
Joseph David Borġ


On 5 September 2013 13:45, Joe Borġ <[email protected]> wrote:

> My bash script is:
>
> #!/bin/bash
> /usr/bin/sudo /sbin/reboot
>
> If I run that on the node itself, it reboots (no password needed).
>
> If I merge the output, I get:
>
> Warning: no access to tty (Bad file descriptor).
> Thus no job control in this shell.
>
> I believe sudo needs a tty, or it won't execute.
>
>
>
> Regards,
> Joseph David Borġ
> http://www.jdborg.com
>
>
> On 5 September 2013 13:35, Reuti <[email protected]> wrote:
>
>> Am 05.09.2013 um 13:30 schrieb Joe Borġ:
>>
>> > No, but I'm running `sudo reboot`.  There is no output in the .e or .o,
>> it seems as if the command is being filtered in bash.
>>
>> And you don't need to enter a password for `sudo` on the node? Does a
>> `sudo id` work and gives the correct user information?
>>
>> -- Reuti
>>
>>
>> > Wrapping in C++ system() and compiling works though.  So just wondering
>> if the command is being stripped from bash?
>> >
>> >
>> >
>> > Regards,
>> > Joseph David Borġ
>> > http://www.jdborg.com
>> >
>> >
>> > On 5 September 2013 12:21, Reuti <[email protected]> wrote:
>> > Hi,
>> >
>> > Am 05.09.2013 um 13:08 schrieb Joe Borġ:
>> >
>> > > If I submit a job with a reboot command at the end, the command
>> doesn't seem to get run.  Is this expected?
>> >
>> > You are running the job under the root account?
>> >
>> > -- Reuti
>> >
>> >
>> > >
>> > > Regards,
>> > > Joseph David Borġ
>> > > _______________________________________________
>> > > SGE-discuss mailing list
>> > > [email protected]
>> > > https://arc.liv.ac.uk/mailman/listinfo/sge-discuss
>> >
>> >
>>
>>
>
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to