Ben Chuanlong Du's Blog

It is never too late to learn.

Environment Variables and Secure Path for sudo

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

sudo -E command_to_run

sudo $(which command_to_run)

sudo env "PATH=$PATH" nvim

The "correct" way is to update the secure path using the commanding sudo visudo.

For more discussions, please refer to …

Proxy for sudo

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

You can setup proxy in a terminal by export environment variables http_proxy and `https_proxy'.

export http_proxy='proxy_server:port'
export https_proxy='proxy_server:port'

However, you might find the exported environment variables are …

User Access Control on Linux

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Login Access Control

The /etc/security/access.conf file specifies (user/group, host), (user/group, network/netmask) or (user/group, tty) combinations for which a login will be either accepted or …