[Bug 1301557] [NEW] sudo not setting environment variables in /etc/environment
    Christopher Hoskin 
    1301557 at bugs.launchpad.net
       
    Wed Apr  2 19:03:51 UTC 2014
    
    
  
Public bug reported:
With 1.8.9p5-1ubuntu1 sudo does not load environment variables from
/etc/environment, which is a change in behaviour from Ubuntu 13.10.
lsb_release -rd
Description:    Ubuntu Trusty Tahr (development branch)
Release:        14.04
apt-cache policy sudo
sudo:
  Installed: 1.8.9p5-1ubuntu1
  Candidate: 1.8.9p5-1ubuntu1
  Version table:
 *** 1.8.9p5-1ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
Steps to reproduce:
cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usrgames:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/jre/"
env | grep JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/
sudo env | grep JAVA_HOME
sudo -s
root at sant-idp:~# env | grep JAVA_HOME
root at sant-idp:~# exit
exit
cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root    ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
Please advise if this is a bug or new intended behaviour? Thanks.
** Affects: sudo (Ubuntu)
     Importance: Undecided
         Status: New
-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1301557
Title:
  sudo not setting environment variables in /etc/environment
Status in “sudo” package in Ubuntu:
  New
Bug description:
  With 1.8.9p5-1ubuntu1 sudo does not load environment variables from
  /etc/environment, which is a change in behaviour from Ubuntu 13.10.
  lsb_release -rd
  Description:    Ubuntu Trusty Tahr (development branch)
  Release:        14.04
  apt-cache policy sudo
  sudo:
    Installed: 1.8.9p5-1ubuntu1
    Candidate: 1.8.9p5-1ubuntu1
    Version table:
   *** 1.8.9p5-1ubuntu1 0
          500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status
  Steps to reproduce:
  cat /etc/environment
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usrgames:/usr/local/games"
  JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/jre/"
  env | grep JAVA_HOME
  JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/
  sudo env | grep JAVA_HOME
  sudo -s
  root at sant-idp:~# env | grep JAVA_HOME
  root at sant-idp:~# exit
  exit
  cat /etc/sudoers
  #
  # This file MUST be edited with the 'visudo' command as root.
  #
  # Please consider adding local content in /etc/sudoers.d/ instead of
  # directly modifying this file.
  #
  # See the man page for details on how to write a sudoers file.
  #
  Defaults        env_reset
  Defaults        mail_badpass
  Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  # Host alias specification
  # User alias specification
  # Cmnd alias specification
  # User privilege specification
  root    ALL=(ALL:ALL) ALL
  # Members of the admin group may gain root privileges
  %admin ALL=(ALL) ALL
  # Allow members of group sudo to execute any command
  %sudo   ALL=(ALL:ALL) ALL
  # See sudoers(5) for more information on "#include" directives:
  #includedir /etc/sudoers.d
  Please advise if this is a bug or new intended behaviour? Thanks.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1301557/+subscriptions
    
    
More information about the foundations-bugs
mailing list