Reputation
1,661
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 12 30
Impact
~79k people reached

  • 0 posts edited
  • 0 helpful flags
  • 164 votes cast
2d
comment The HOST variable in /etc/sudoers
That would mean that keeping the ALL instead of a specific host name makes the sudoers no less secure, if only employed locally on one box, right?
Apr
17
awarded  Notable Question
Mar
31
awarded  Popular Question
Mar
25
awarded  Popular Question
Mar
15
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
Great job enriching the answer with a reference to the sudo source, which settles the question, to it being impossible (least changing the source and compile yourself) to get sudo to refrain from adding $SUDO_USER. Anyway with the insight given into env also in your answer nobody would need to go into the trouble changing the source. thanks for the answer
Mar
15
accepted how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
thank you for this clarification. If you can substantiate, that sudo has no way of getting its "I do not leave some unwanted environment variables like $SUDO_USER"-shit together, then you could add that to your answer for me to accept it. Or maybe somebody else is able to supply such evidence in another answer. thank you also for pointing out the customizability thing. I also think it is great that you solution might be not relying on /usr/bin/env to exist, though I think one could
Mar
13
revised how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
added 2018 characters in body
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
On a second note: How does the solution you offer differ from the one I included in the question itself sudo -u powerless env -i /bin/processCmd, that is, do you think that your noenv is favourable over env -i?
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
@tendon, without wanting to make this a lengthy comment discussion, I think it is best to state here once more what I think is already inside of the question. I do not want $SUDO_USER being set by sudo in the environment. I think that is reasonable to ask, since it is totally sudo that does it and I thought, there might be a flag to keep it from doing it. So my goal is to not have sudo add stuff to my environment. Since being invoked after a env -i it finds an clean environment and should not polute that. I think that is reasonable to ask. sudo has no reason to dirty my env.
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
thank you for offering this script, much appreciated! Yet in relation to the question, the answer is that with sudo alone one can not really have any flag that would set sudo to explicitly not include new stuff to the environment, especially $SUDO_USER, is that correct?
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
@terdon. I have edited the question. I will have to get some knowledge about which environment variables are absolutely needed. I think people think some are needed, when indeed they are simpy useful, I have myself writen lots of programs that never ever used -at least explicitly- any information form the environment. Anyway as edited to the question, not leaking SUDO_USER would be a great start
Mar
13
revised how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
added 377 characters in body
Mar
13
comment how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
@Pandya nice idea :). surely the preserve environment flag would not be the first comming to mind, if I explicitly intend to not preserve it. Still given that I env -i cleaned the environment, I would like to preserve a clean environment. I tried it and still sudo is poluting my $(env) with $SUDO_USER. What does this yield to you? env -i sudo -E /bin/printenv
Mar
13
revised how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
further clarification
Mar
13
asked how to: Please sudo, do _not_ setup any environment, especially $SUDO_USER?
Mar
4
awarded  Popular Question
Mar
1
comment How do keyboard input and text output work?
Not completely sure, but since the answer is generally rather detailed I wonder if the part that says "Application running in a text console" might not feature that there things like man 5 keymaps are used for translating the keycodes to scancodes. While as mentioned principly similar it yet is a whole different set of tools/programs and this would merit maybe some more insights. Next to that the answer is +1 and great because of the embedded related questions.
Mar
1
comment How does pressing the “A” key (e.g PS/2 i8042 keyboard) make its way from linux kernel to userland?
@Gilles thank you for pointing me to the reference question. Good question that is by the way, cannot believe I missed it when looking about this issue.
Feb
29
comment How does pressing the “A” key (e.g PS/2 i8042 keyboard) make its way from linux kernel to userland?
@vonbrand all what makes the kernelside part of this a challange is yet added more confusion looking at the way all stuff gets rearranged in X11/xorg xkb part (compats, keymaps, keycodes, symbols,types,rules,geometry) scancode. I simply hope all the complexity turns out to be very necessary once I get to understand more