Allowing user to set environment variable with sudo

Published on Author Akhil Bansal15 Comments

I encountered the following error today while installing a few packages on a ubuntu server using a sudo user.

“sudo: sorry, you are not allowed to set the following environment variables: DEBIAN_FRONTEND”

The command I ran was: “sudo DEBIAN_FRONTEND=noninteractive apt-get install -qy git-core”

I did search on google and did’nt find any direct answer for this error. Then I somehow figured out that if we change env_reset line in sudoers file then it allows sudo user to set environment.
I changed
“Defaults env_reset”
to
“Defaults !env_reset”

I don’t have any idea, what could be consequences of this change. So I reverted it after my job is done.

15 Responses to Allowing user to set environment variable with sudo

  1. Hello Rapid dilemma that’s completely out subject matter.
    Are you aware of how to make an internet site portable hospitable? My web page appearances odd when surfing around from my smartphone.
    I’m trying to find a concept or wordpress tool that could possibly deal with this matter. Please share if you have any suggestions.
    Thanks a lot.

  2. Good day! Do you know if they make any plugins to
    help with SEO? I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good success.
    If you know of any please share. Many thanks!

  3. Hi, I do believe this is a great blog. I stumbledupon
    it 😉 I’m going to revisit once again since i have bookmarked it.
    Money and freedom is the best way to change, may you be rich and continue to help others.

  4. Excellent items from you, man. I’ve have in mind your stuff previous to and you
    are just extremely magnificent. I actually like what you have bought here, certainly like what you’re stating and the way through which you are
    saying it. You are making it enjoyable and you still care for to stay
    it sensible. I can’t wait to read much more from you.
    That is actually a tremendous web site.

  5. Hi there, i read your blog occasionally and
    i own a similar one and i was just wondering if you get a lot of spam
    feedback? If so how do you stop it, any plugin or anything you can recommend?
    I get so much lately it’s driving me insane so any support is very much appreciated.

  6. I think this is one of the such a lot significant information for me.
    And i am happy reading your article. But want to observation on some general
    things, The website style is wonderful, the articles is actually great :
    D. Just right process, cheers

  7. Hey there! This is kind of off topic but I need some help from an established blog.
    Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about setting up my own but I’m not sure where to start.

    Do you have any tips or suggestions? Cheers

  8. I’ve been exploring for a bit for any high quality articles or blog posts in this kind of
    area . Exploring in Yahoo I ultimately stumbled upon this
    site. Reading this info So i’m happy to exhibit that I
    have a very good uncanny feeling I discovered just what I
    needed. I most without a doubt will make certain to
    don?t overlook this website and give it a glance on a relentless basis.

  9. I’m really enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more enjoyable for me
    to come here and visit more often. Did you hire out a developer to create your
    theme? Exceptional work!

Leave a Reply

Your email address will not be published. Required fields are marked *