Thursday, October 15, 2015

Run “sudo apt-get update” through Proxy In Ubuntu 14.04

                                       In some releases sudo is configured in such a way that all environment variables all cleared when running the command. To keep the value for your http_proxy and fix this, you need to edit /etc/sudoers,
Defaults env_keep = "http_proxy https_proxy ftp_proxy DISPLAY XAUTHORITY"
Note :- For modifying the /etc/sudoers, we need to set writable permission.but sometime after setting the Permission and Updating Proxy values (As mentioned above), it will shows some error like
Solve “sudo: /etc/sudoers.d is world writable”
                                      pkexec will use a different method of using root permissions, bypassing the issue.And the chmod will fix the permissions.
pkexec chmod 0440 /etc/sudoers

No comments:

Post a Comment

bloggerwidgets