in 767198 20161104 142132 Thomas 'PointedEars' Lahn wrote:
>Ben Finney wrote:
>
>> Note that âsudoâ is specifically designed to be invoked interactively,
>
>Nonsense.
>
>> seeking to verify that the current user has credentials to run the
>> command.
>
>NOPASSWD is not the default in sudoers(5
On Tue, 01 Nov 2016 11:23:09 -0400, D'Arcy Cain wrote:
> On 2016-11-01 01:23 AM, Ben Finney wrote:
>> Wildman via Python-list writes:
>> So the way your script was invoked has no bearing on whether Bash will
>> get involved in what your script does. Your script is *directly*
>> invoking programs,
On 2016-11-01 01:23 AM, Ben Finney wrote:
Wildman via Python-list writes:
So the way your script was invoked has no bearing on whether Bash will
get involved in what your script does. Your script is *directly*
invoking programs, and if you don't ask for a shell to be involved you
won't get it.
On Tue, 01 Nov 2016 13:42:03 +, Grant Edwards wrote:
> On 2016-11-01, Steve D'Aprano wrote:
>> On Tue, 1 Nov 2016 04:00 pm, Wildman wrote:
>>
>>> You are correct about that but, in this case grep never "sees" the '$'
>>> sign. Bash expands $USER to the actual user name beforehand. If you
>>
On Tue, 01 Nov 2016 16:52:18 +1100, Steve D'Aprano wrote:
> On Tue, 1 Nov 2016 04:00 pm, Wildman wrote:
>
>> You are correct about that but, in this case grep never "sees" the '$'
>> sign. Bash expands $USER to the actual user name beforehand. If you
>> are on a Linux system, enter this into a
On Tue, 01 Nov 2016 16:23:08 +1100, Ben Finney wrote:
> Wildman via Python-list writes:
>
>> […] in this case grep never "sees" the '$' sign. Bash expands $USER to
>> the actual user name beforehand.
>
> I understand how Bash substitutes variables on the command line.
>
> What I need to repeat
On 2016-11-01, Steve D'Aprano wrote:
> On Tue, 1 Nov 2016 04:00 pm, Wildman wrote:
>
>> You are correct about that but, in this case grep never "sees" the '$'
>> sign. Bash expands $USER to the actual user name beforehand. If you
>> are on a Linux system, enter this into a terminal to illustrate
On Tue, 1 Nov 2016 04:00 pm, Wildman wrote:
> You are correct about that but, in this case grep never "sees" the '$'
> sign. Bash expands $USER to the actual user name beforehand. If you
> are on a Linux system, enter this into a terminal to illustrate:
>
> sudo grep ^$USER\: /etc/shadow
Bash
Wildman via Python-list writes:
> […] in this case grep never "sees" the '$' sign. Bash expands $USER to
> the actual user name beforehand.
I understand how Bash substitutes variables on the command line.
What I need to repeat, though: In this case, no, Bash doesn't do that
because Bash isn't g
On Tue, 01 Nov 2016 12:08:52 +1100, Ben Finney wrote:
> Wildman via Python-list writes:
>
>> On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
>>
>> > One immediate difference I see is that you specify different
>> > arguments to ‘grep’. You have a different pattern for each command.
>> >
>
Wildman via Python-list writes:
> On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
>
> > One immediate difference I see is that you specify different
> > arguments to ‘grep’. You have a different pattern for each command.
> >
> > * The ‘^user\:’ pattern matches “user\:” at the start of a li
On 2016-10-31, Wildman via Python-list wrote:
> On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
>> Wildman via Python-list writes:
>>
>>> Python 2.7.9 on Linux
>>>
>>> Here is a bash command that I want to run from a python
>>> program: sudo grep "^user\:" /etc/shadow
>>
>> Some points t
On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
> Wildman via Python-list writes:
>
>> Python 2.7.9 on Linux
>>
>> Here is a bash command that I want to run from a python
>> program: sudo grep "^user\:" /etc/shadow
>
> Some points to note:
>
> * Those commands are not special to Bash, o
On Mon, Oct 31, 2016 at 3:44 PM, Ben Finney wrote:
> Note that ‘sudo’ is specifically designed to be invoked interactively,
> seeking to verify that the current user has credentials to run the
> command.
>
> Note further that ‘sudo’ will record when the *current user session*
> last invoked ‘sudo’
Wildman via Python-list writes:
> Python 2.7.9 on Linux
>
> Here is a bash command that I want to run from a python
> program: sudo grep "^user\:" /etc/shadow
Some points to note:
* Those commands are not special to Bash, or any particular shell. They
invoke commands, without AFAIK any speci
15 matches
Mail list logo