>From my rudimentary knowledge, it doesn't look like NOPASSWD has been
specified for running that command and so I'd expect it to prompt for the
password (and hence get the issue you are seeing).

I could be wrong though as I don't have a setup available to me which has
similar sudoers settings :)

Richard.


On Tue, Oct 14, 2014 at 12:05 AM, niraj nandane <[email protected]>
wrote:

>  sudo -u root chown habdbsync  <some files>
> This stmt is making above "no tty" output
>
> On Mon, Oct 13, 2014 at 4:33 PM, niraj nandane <[email protected]>
> wrote:
>
>> output of sudo -l
>> (habdbsync) NOPASSWD: ALL, (habdbsync) !/bin/sh, !/bin/ksh, !/bin/csh,
>> !/bin/tcsh, !/bin/zsh, !/bin/bash, (habdbsync) !/bin/su,
>>     (habdbsync) !/usr/bin/ssh, !/usr/bin/scp, !/usr/bin/slogin
>>     (root) /bin/chown habdbsync /devbuild/*
>>     (root) /bin/chown -R root\:root /devbuild/*
>>     (root) /bin/chown root\:root /devbuild/*
>>     (root) /bin/true
>>
>> On Mon, Oct 13, 2014 at 3:41 PM, Richard Bywater <[email protected]>
>> wrote:
>>
>>> Hmm my sudo is a bit rusty - but perhaps you could list the output of
>>> "sudo -ll" which I think will make it a bit easier to read.
>>>
>>> Also what command/s is the build doing when it gets prompted (and I
>>> assume Jenkins is running as the user skhandeb?)
>>>
>>> Richard.
>>>
>>> PS Please keep discussions on the list as that way others can jump in
>>> and help out if they see the potential issue :)
>>>
>>> On Mon, Oct 13, 2014 at 11:02 PM, niraj nandane <[email protected]
>>> > wrote:
>>>
>>>> Hi,
>>>> The idea is the buildmachine have access for 3 hrs to build server.
>>>> When i run build on build machine without using jenkins its get completed
>>>> and dont ask ever password . The script i run also have sudo stmts. But
>>>> when we run same script from jenkins its say above error.
>>>>
>>>> The output of sudo -l is
>>>>
>>>> User skhandeb may run the following commands on this host:
>>>>     (habdbsync) NOPASSWD: ALL, (habdbsync) !/bin/sh, !/bin/ksh,
>>>> !/bin/csh, !/bin/tcsh, !/bin/zsh, !/bin/bash, (habdbsync) !/bin/su,
>>>>     (habdbsync) !/usr/bin/ssh, !/usr/bin/scp, !/usr/bin/slogin
>>>>     (root) /bin/chown habdbsync /devbuild/*
>>>>     (root) /bin/chown -R root\:root /devbuild/*
>>>>     (root) /bin/chown root\:root /devbuild/*
>>>>     (root) /bin/true
>>>>
>>>> --
>>>> Thanks and regards--
>>>> Niraj Nandane(Vit pune)
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Jenkins Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/jenkinsci-users/JUpplb7mV3k/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Thanks and regards--
>> Niraj Nandane(Vit pune)
>>
>>
>
>
> --
> Thanks and regards--
> Niraj Nandane(Vit pune)
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to